Good work everyone!
I am writing a program with QT using C++. In the program I have a function to show OpenCV matrices in the background. In my main loop
QImage img( vars.frame.data, vars.frame.cols, vars.frame.rows, vars.frame.step, QImage::Format_BGR888);
vars.ui.background->setPixmap(QPixmap::fromImage(img));
when I do this transformation and then
QCoreApplication::processEvents();
when I call this process, processEvents takes a significant amount of time, about 15-16 ms.
But when I call the processEvents function directly without using background, it takes less than 1 ms.
I also tried this with OpenGL Widget, QGraphicsView and QLabel and got no different result.
How can I overcome this. Thank you in advance.
Processor: Intel(R) Core(TM) i7-7560U CPU @ 2.40GHz
Display Card: Intel(R) Iris(R) Plus Graphics 640
1