Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. way to show image sequence without using timer or thread
QtWS25 Last Chance

way to show image sequence without using timer or thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
image display
11 Posts 4 Posters 878 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Make it GREAT again
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @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.

        M Offline
        M Offline
        Make it GREAT again
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          M 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            @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.

            M Offline
            M Offline
            Make it GREAT again
            wrote on last edited by
            #5

            @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.

            JonBJ 1 Reply Last reply
            0
            • M Make it GREAT again

              @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.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @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.

              M 1 Reply Last reply
              1
              • JonBJ JonB

                @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.

                M Offline
                M Offline
                Make it GREAT again
                wrote on last edited by
                #7

                Hi, @JonB. Thanks for your reply. Does that mean I can use several QTimer(s) con-currently for different task in my program.

                Pl45m4P JonBJ 2 Replies Last reply
                0
                • M Make it GREAT again

                  Hi, @JonB. Thanks for your reply. Does that mean I can use several QTimer(s) con-currently for different task in my program.

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote on last edited by
                  #8

                  @Make-it-GREAT-again

                  What made you think, that there can be only one QTimer in your whole program?


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  M 1 Reply Last reply
                  0
                  • M Make it GREAT again

                    Hi, @JonB. Thanks for your reply. Does that mean I can use several QTimer(s) con-currently for different task in my program.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #9

                    @Make-it-GREAT-again
                    You may use as many QTimers as you wish. (Probably within reason: I don't know what happens if you create 1,000,000 of them!)

                    M 1 Reply Last reply
                    1
                    • Pl45m4P Pl45m4

                      @Make-it-GREAT-again

                      What made you think, that there can be only one QTimer in your whole program?

                      M Offline
                      M Offline
                      Make it GREAT again
                      wrote on last edited by
                      #10

                      @Pl45m4 . LOL. Do not know Qt very much. I have been thinking multi-Qtimer should be affected by each other.

                      1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Make-it-GREAT-again
                        You may use as many QTimers as you wish. (Probably within reason: I don't know what happens if you create 1,000,000 of them!)

                        M Offline
                        M Offline
                        Make it GREAT again
                        wrote on last edited by
                        #11

                        @JonB . Thanks for this answer.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved