Skip to content

Commit 66bbf6d

Browse files
committed
Change old cv2 Window processing system with waitKey to QThread::sleep
1 parent 6320c5c commit 66bbf6d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Client/src/presenter/presenter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include "../version.h"
1010

11+
#include <QThread>
12+
#include <qapplication.h>
1113

1214
Presenter::Presenter(IView& view, std::unique_ptr<TrackerFactory>&& t_factory, std::unique_ptr<ConfigMgr>&& conf_mgr)
1315
{
@@ -214,7 +216,8 @@ void Presenter::run_loop()
214216
view->paint_video_frame(mat);
215217
}
216218

217-
cv::waitKey(1000/state.video_fps);
219+
QApplication::processEvents();
220+
QThread::msleep(1000 / state.video_fps);
218221
}
219222

220223
cam->stop_camera();

0 commit comments

Comments
 (0)