Mousemove is very slow in QGraphicsView
I have created following Items Inherited with QGraphicsItem
- HCursor Item
- VCursor Item
- XYPlane Item
- ChannelData Item
- Offset Item
The above items are added to DSOScene(QGraphicsScene)
Each Item has individual Paint event It was constructed in my DSOGridView (QGraphicView)
When I like to paint my QGraphicsview inside my QTimer It will slow down my mousemovements.
How to implement QGraphicsview without affecting mouseevents.
Hi friends, No one faced this problem or No solution ?
No and maybe. What is strange is your "paint in inside QTimer". Can you show your code ?
its big code. i can't paste here within allowed characters.
ok but why do you really use a QTimer for painting?
seems to me that you do more work than you need to.
what else i can use for plotting the graph with huge sample points fastly.
should it be a real time graph?
yes. Digital Oscilloscope.
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?
yea i saw Qwt.
It requires opengl ES . Right now we are not using opengl ES.
we use about 10K~50K samples.
[quote author="dreamerindia" date="1382709833"]
we use about 10K~50K samples.[/quote]
every time QTimer fires you paint this amount of dots?
yes we are using QTimer for this.
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.
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.