Hi, I started building a plugin for QGIS using PyQtGraph, as it is much 
quicker than MatPlotLib, and it is modeled around a scenegraph, which suits 
me fine.

I need to do a lot of custom drawing, so my code is built around the 
customGraphicsItem.py example.

My graphics class starts as follows:

class RollSurvey(pg.GraphicsObject):
    def __init__(self, name: str = 'Untitled')-> None:                     
     # assign default name value
        pg.GraphicsObject.__init__(self)
        etc...

To keep the paint effort manageable, I am using four different 
levels-of-detail (LOD) similar to the Qt 40000-chips example found here 
<https://github.com/mootterry/chip40000-python>. 

Here's my problem; in order to keep the plotting responsive when the user 
is *panning *the plot, I need to step back by (at least) one 
level-of-detail. But I have not been able to properly capture the *mouse-down 
*status, in order to reduce drawing effort whilst panning. The event 
sequence that I observe is :

QEvent::WindowActivate
QEvent::GrabMouse
QEvent::GraphicsSceneMousePress
QEvent::UngrabMouse
Painting - Mouse grabbed: False
Painting - Mouse grabbed: False
Painting - Mouse grabbed: False
Painting - Mouse grabbed: False
Painting - Mouse grabbed: False

I set the mouseGrabbed = True  condition when the "GrabMouse" event occurs 
and reset it at "UngrabMouse".

What I do not understand is that the mouse is already "ungrabbed" before 
painting starts... 

Any suggestions what I am doing wrong / overlooking here ?

Thanks very much.

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/9e2d8413-305e-4ccd-ac1f-5698978e9f70n%40googlegroups.com.

Reply via email to