Hi,

Not sure if this is the cleanest way to do it, but you can connect to the 
GraphicsScene menu item signal, something like:

class TestPlot(pg.GraphicsLayoutWidget):
    def __init__(self):
        # ... usual init stuff
        self.ci.scene().contextMenu[0].triggered.connect(self.export_clicked
)

    def export_clicked(self):
       print("Export")

Note, ci is the central item (a GraphicsLayout) in the 
GraphicsLayoutWidget. The scene() method gets the associated GraphicsScene. 
If you're not using a GraphicsLayoutWidget then finding the GraphicsScene 
might be a little different.

Patrick


On Thursday, 8 August 2019 19:18:20 UTC+9:30, Gáll Péter wrote:
>
> Hi!
>
> I'm plotting real time data with pyqtgraph and I can pause it with a 
> button in the GUI.
> I would like to pause the plotting, when Export menu is clicked from the 
> context menu.
> Is there any way to detect that the export menu is opened?
> Thanks.
>

-- 
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/ef12976c-094d-46da-91a9-33926a90dcb7%40googlegroups.com.

Reply via email to