Hi, I guess you'd connect to the sigValueChanged or sigValueChanging signal for the Parameter <http://www.pyqtgraph.org/documentation/parametertree/parameter.html> you'd like to check. Or maybe both, since on the first sigValueChanging you might want to do a saveState or save the value(), so you can restoreState on sigValueChanged if the value is invalid.
Patrick On Wednesday, 12 February 2020 19:01:48 UTC+10:30, Yannick Willener wrote: > > Hello > > I'm trying to cancel a value change in a parameter tree. > > The user enters a value, then the value is checked if supported depending > on other values. > If not I would like to display a warning to the user and cancel the change > (reverting to the initial value). > > I have tried to use the sigTreeStateChanged signal to handle that, but > with no success. > > What is the correct method to implement it? > > Thanks > Yannick > -- 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/8bf72663-5cab-4be6-9cbc-1b303b8a2403%40googlegroups.com.
