Is there a way of reading the previous value of a QSpinbox?
-
As the title suggests. I'm making a function that would greatly benefit from the ability to read the previous value of a QSpinbox, and I'm wondering whether this function exists without making an int that manually reads and saves the data before the value changes. Please let me know if more info is required.
-
As the title suggests. I'm making a function that would greatly benefit from the ability to read the previous value of a QSpinbox, and I'm wondering whether this function exists without making an int that manually reads and saves the data before the value changes. Please let me know if more info is required.
@Dummie1138 said in Is there a way of reading the previous value of a QSpinbox?:
I'm wondering whether this function exists
If you are talking about something like
aboutToChange(int oldVal)
, unfortunately not (forQSpinBox
at least).
ContextMenus have anaboutToShow
signal before they are shown, butQSpinBox
doesn't . As soon as you get yourvalueChanged
signal, the widget itself forgets about the old value, if you haven't saved it.