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. Mousemove is very slow in QGraphicsView
Qt 6.11 is out! See what's new in the release blog

Mousemove is very slow in QGraphicsView

Scheduled Pinned Locked Moved Mobile and Embedded
14 Posts 3 Posters 4.9k Views 1 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.
  • D Offline
    D Offline
    dreamerindia
    wrote on last edited by
    #1

    Description:

    I have created following Items Inherited with QGraphicsItem

    1. HCursor Item
    2. VCursor Item
    3. XYPlane Item
    4. ChannelData Item
    5. Offset Item

    The above items are added to DSOScene(QGraphicsScene)
    Each Item has individual Paint event It was constructed in my DSOGridView (QGraphicView)
    Problem:
    When I like to paint my QGraphicsview inside my QTimer It will slow down my mousemovements.

    How to implement QGraphicsview without affecting mouseevents.

    ~Ravivarman~

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dreamerindia
      wrote on last edited by
      #2

      Hi friends, No one faced this problem or No solution ?

      ~Ravivarman~

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

        Hi,

        No and maybe. What is strange is your "paint in inside QTimer". Can you show your code ?

        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
        • D Offline
          D Offline
          dreamerindia
          wrote on last edited by
          #4

          its big code. i can't paste here within allowed characters.

          ~Ravivarman~

          1 Reply Last reply
          0
          • raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            ok but why do you really use a QTimer for painting?
            seems to me that you do more work than you need to.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dreamerindia
              wrote on last edited by
              #6

              dear raven-worx,

              what else i can use for plotting the graph with huge sample points fastly.

              ~Ravivarman~

              1 Reply Last reply
              0
              • raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                should it be a real time graph?

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dreamerindia
                  wrote on last edited by
                  #8

                  yes. Digital Oscilloscope.

                  ~Ravivarman~

                  1 Reply Last reply
                  0
                  • raven-worxR Offline
                    raven-worxR Offline
                    raven-worx
                    Moderators
                    wrote on last edited by
                    #9

                    did you consider using "Qwt":http://qwt.sourceforge.net/curvescreenshots.html (if possible)?

                    otherwise - without knowing your code - i would say you should optimize your data handling used for drawing. Thats most probably slowing down your painting.

                    Do you store each single point and draw it as a graph? If so about how much points are we talking?

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dreamerindia
                      wrote on last edited by
                      #10

                      yea i saw Qwt.

                      It requires opengl ES . Right now we are not using opengl ES.

                      we use about 10K~50K samples.

                      ~Ravivarman~

                      1 Reply Last reply
                      0
                      • raven-worxR Offline
                        raven-worxR Offline
                        raven-worx
                        Moderators
                        wrote on last edited by
                        #11

                        [quote author="dreamerindia" date="1382709833"]
                        we use about 10K~50K samples.[/quote]
                        every time QTimer fires you paint this amount of dots?

                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                        If you have a question please use the forum so others can benefit from the solution in the future

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          dreamerindia
                          wrote on last edited by
                          #12

                          yes we are using QTimer for this.

                          ~Ravivarman~

                          1 Reply Last reply
                          0
                          • raven-worxR Offline
                            raven-worxR Offline
                            raven-worx
                            Moderators
                            wrote on last edited by
                            #13

                            this sounds way too much for me just for painting... and is most probably the reason for your performance issue IMHO.

                            Do you get the points in an ordered way? If so you should be able to optimize it and discard a certain amount of points and don't even save them ... at least for painting.

                            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                            If you have a question please use the forum so others can benefit from the solution in the future

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              dreamerindia
                              wrote on last edited by
                              #14

                              Points are not in ordered way.
                              Points Range: 10000 - 50000
                              Each point represents the real time signal level and it is stored in QVector and the QVector points are plotted.
                              for eg. every 10 milli second my point will be updated and painting is required.
                              any other S/W or H/W buffering technique to render my points without disturbing my mouse event.

                              ~Ravivarman~

                              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