way to show image sequence without using timer or thread
-
Hello,
Try displaying a sequence of image with signal slot but without using timer and thread. Is there a good way to do.
Images are saved somewhere in a partition and are orderly named. I use OpenCV to read each and convert the one read into QImage and show it with QLabel. It is OK for a single image. What if I want to do so for all of them. I didn't find label item can emit signal while its content was changed. -
@Make-it-GREAT-again said in way to show image sequence without using timer or thread:
but without using timer
use a QTimer, everything else will not work.
-
Hi, @Christian-Ehrlicher . Thanks for reply at first. I cannot use QTimer for timer is an option of my project to limit running time of the entire application (or program).
I have just found a virtual function named PaintEvent. Is that possible to re-implement this to do my work like this
https://stackoverflow.com/questions/1242005/what-is-the-most-efficient-way-to-display-decoded-video-frames-in-qt?rq=1 -
@Make-it-GREAT-again said in way to show image sequence without using timer or thread:
I cannot use QTimer for timer is an option of my project to limit running time of the entire application
I don't understand what you mean.
-
@Christian-Ehrlicher
I use a checkbox to choose using a timer for controlling the running time of my program. It means that the program should be automatically stopped in a time mannually speicified once the timer is selected via the checkbox. QTimer is simply for couting time down. -
@Make-it-GREAT-again said in way to show image sequence without using timer or thread:
It means that the program should be automatically stopped in a time mannually speicified once the timer is selected via the checkbox. QTimer is simply for couting time down.
Again, don't know what you mean here. Don't know what you think the restriction is, if you want to "manually specify a time" for a
QTimer
you can load/reload it with that, stop it, reset, do whatever to it. -
What made you think, that there can be only one
QTimer
in your whole program? -
@Make-it-GREAT-again
You may use as manyQTimer
s as you wish. (Probably within reason: I don't know what happens if you create 1,000,000 of them!)