Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT QCUSTOM plot flickering problem
Qt 6.11 is out! See what's new in the release blog

QT QCUSTOM plot flickering problem

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
21 Posts 2 Posters 11.6k Views 2 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #5

    As I already wrote you have a QTimer that is literally spamming the event loop to update your plot which is wrong. Do smart updates. Human eyes are still working at 24fps so there's not need to try to refresh your plot at light speed.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    S 2 Replies Last reply
    0
    • SGaistS SGaist

      As I already wrote you have a QTimer that is literally spamming the event loop to update your plot which is wrong. Do smart updates. Human eyes are still working at 24fps so there's not need to try to refresh your plot at light speed.

      S Offline
      S Offline
      swansorter
      wrote on last edited by
      #6

      @SGaist actually the whole graph is updating .
      individual point update not happening

      1 Reply Last reply
      0
      • SGaistS SGaist

        As I already wrote you have a QTimer that is literally spamming the event loop to update your plot which is wrong. Do smart updates. Human eyes are still working at 24fps so there's not need to try to refresh your plot at light speed.

        S Offline
        S Offline
        swansorter
        wrote on last edited by
        #7

        @SGaist if set my timer 100 there is no flicker.but when ever the array content changes graph also needs to change.that change not happening smoothly(transition form old values of array to new values array )

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #8

          How much data are your receiving ?
          How fast ?
          What is it representing ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • SGaistS SGaist

            How much data are your receiving ?
            How fast ?
            What is it representing ?

            S Offline
            S Offline
            swansorter
            wrote on last edited by
            #9

            @SGaist I am reading line camera pixel values.
            1.Each line is 2048 pixel (in the form RGB888)
            2.The data are reading through ETHERNET(tcp/ip) protocal
            3.I need to plot the graph(RGB) based on the received data.
            4.Speed is 100mbps
            5.its representing pixel intensity

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #10

              How are you bringing these data to your application ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              S 1 Reply Last reply
              0
              • SGaistS SGaist

                How are you bringing these data to your application ?

                S Offline
                S Offline
                swansorter
                wrote on last edited by
                #11

                @SGaist Reading it from a line scan sensor .(interface :ethernet)

                S SGaistS 3 Replies Last reply
                0
                • S swansorter

                  @SGaist Reading it from a line scan sensor .(interface :ethernet)

                  S Offline
                  S Offline
                  swansorter
                  wrote on last edited by
                  #12
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • S swansorter

                    @SGaist Reading it from a line scan sensor .(interface :ethernet)

                    S Offline
                    S Offline
                    swansorter
                    wrote on last edited by
                    #13

                    @swansorter Graph points not changing from present points to updated points (smooth transition),instead the whole graph is changing
                    ezgif.com-resize.gif

                    1 Reply Last reply
                    0
                    • S swansorter

                      @SGaist Reading it from a line scan sensor .(interface :ethernet)

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #14

                      @swansorter said in QT QCUSTOM plot flickering problem:

                      @SGaist Reading it from a line scan sensor .(interface :ethernet)

                      I understand the hardware you are using, my question is what are you using at the software layer to get the data ?

                      From the looks of your code you are just replacing all the data so I don't know how you can expect a smooth transition.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        swansorter
                        wrote on last edited by
                        #15

                        testing purpose only i used two array .
                        if it is works then i ill updated to ethernet code(RTP Protocal)

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #16

                          As I wrote before, you are literally replacing the values. If you want a smooth transition, you will have to write yourself the intermediate values to go from one list to the other.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          S 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            As I wrote before, you are literally replacing the values. If you want a smooth transition, you will have to write yourself the intermediate values to go from one list to the other.

                            S Offline
                            S Offline
                            swansorter
                            wrote on last edited by
                            #17

                            @SGaist if use random generator it works fine
                            points.append(QPointF(k , qrand() % ((10 + 1) - 5) + 5));
                            if i replace array values its not working?
                            sir if have the code for intermediate values please share.i want to change the values of dynamically.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #18

                              @swansorter said in QT QCUSTOM plot flickering problem:

                              @SGaist if use random generator it works fine
                              points.append(QPointF(k , qrand() % ((10 + 1) - 5) + 5));

                              How are you using that comparing to your array implementation ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              S 1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                swansorter
                                wrote on last edited by swansorter
                                #19

                                No just checked example program and implemented it .
                                Instead of array values i used that random generator.

                                1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  @swansorter said in QT QCUSTOM plot flickering problem:

                                  @SGaist if use random generator it works fine
                                  points.append(QPointF(k , qrand() % ((10 + 1) - 5) + 5));

                                  How are you using that comparing to your array implementation ?

                                  S Offline
                                  S Offline
                                  swansorter
                                  wrote on last edited by
                                  #20

                                  @SGaist each cycle array values are changing and and in random generator changes on evry cycle

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #21

                                    You should rather concentrate on actual real data or at least use realistic test data. Using just two tables does not reflect reality and what you will get from your device.

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    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