"update" button override

16 views
Skip to first unread message

dhabbyc

unread,
Jul 30, 2018, 10:25:40 AM7/30/18
to pyqtgraph
Hello everyone,

 I have a PlotWidget inside a pyside application.

 For my purposes, I have manipulated the X axis limits (using the 'setXRange' method). But on the plot, on hover, appears a small button on the bottom left corner:

Which 'updates', when clicked, the plot. But the result has no regard for the range setted by 'setXRange'.

 How can I override the behaviour of this update?

Regards.

D.

dhabbyc

unread,
Aug 2, 2018, 8:10:38 PM8/2/18
to pyqtgraph
ok so I found the method connected to the signal of the button.

 The button is 'autoBtn' and is connected to the 'autoBtnClicked' slot, which, calls the viewbox 'enableAutoRange' method. For what I wanted I had to rewrite the 'autoBtnClicked' method and play around the 'state' dictionary... very painful.

 The button can be disbled by the "disableButtons" method on the PloItem class.
Reply all
Reply to author
Forward
0 new messages