From 66bbf6d307c46aa8e3e20d995d2a2d0278e64beb Mon Sep 17 00:00:00 2001 From: AIRLegend Date: Thu, 11 Feb 2021 18:22:51 +0100 Subject: [PATCH] Change old cv2 Window processing system with waitKey to QThread::sleep --- Client/src/presenter/presenter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Client/src/presenter/presenter.cpp b/Client/src/presenter/presenter.cpp index a336af0..1022a73 100644 --- a/Client/src/presenter/presenter.cpp +++ b/Client/src/presenter/presenter.cpp @@ -8,6 +8,8 @@ #include "../version.h" +#include +#include Presenter::Presenter(IView& view, std::unique_ptr&& t_factory, std::unique_ptr&& conf_mgr) { @@ -214,7 +216,8 @@ void Presenter::run_loop() view->paint_video_frame(mat); } - cv::waitKey(1000/state.video_fps); + QApplication::processEvents(); + QThread::msleep(1000 / state.video_fps); } cam->stop_camera();