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

way to show image sequence without using timer or thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
image display
11 Posts 4 Posters 881 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 8 Jan 2021, 15:40 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
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 8 Jan 2021, 15:42 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 8 Jan 2021, 15:51
      1
      • C Christian Ehrlicher
        8 Jan 2021, 15:42

        @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 8 Jan 2021, 15:51 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
        • C Online
          C Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 8 Jan 2021, 15:52 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 8 Jan 2021, 16:02
          1
          • C Christian Ehrlicher
            8 Jan 2021, 15:52

            @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 8 Jan 2021, 16:02 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.

            J 1 Reply Last reply 8 Jan 2021, 16:27
            0
            • M Make it GREAT again
              8 Jan 2021, 16:02

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

              J Offline
              J Offline
              JonB
              wrote on 8 Jan 2021, 16:27 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 10 Jan 2021, 03:40
              1
              • J JonB
                8 Jan 2021, 16:27

                @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 10 Jan 2021, 03:40 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.

                P J 2 Replies Last reply 10 Jan 2021, 04:01
                0
                • M Make it GREAT again
                  10 Jan 2021, 03:40

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

                  P Offline
                  P Offline
                  Pl45m4
                  wrote on 10 Jan 2021, 04:01 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 11 Jan 2021, 02:19
                  0
                  • M Make it GREAT again
                    10 Jan 2021, 03:40

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

                    J Offline
                    J Offline
                    JonB
                    wrote on 10 Jan 2021, 07:50 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 11 Jan 2021, 02:29
                    1
                    • P Pl45m4
                      10 Jan 2021, 04:01

                      @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 11 Jan 2021, 02:19 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
                      • J JonB
                        10 Jan 2021, 07:50

                        @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 11 Jan 2021, 02:29 last edited by
                        #11

                        @JonB . Thanks for this answer.

                        1 Reply Last reply
                        0

                        8/11

                        10 Jan 2021, 04:01

                        • Login

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