QDoubleSpinBox -- how to tell if signal is from spin box or field
The QDoubleSpinBox is very close to what I basically need, with one notible issue.
When handling the slots and signals I want this behavior:
- If I edit the text I want the signal after I hit enter.
- If I edit the spinner, I want the signal
- As I type in the text I DONT want a signal. I just want the signal after the user hits the enter key.
The trouble this causes is with my Undo implementation. If I'm in the middle of typing a number in the field, I don't want store off a undo for every character! Is there a way to tell which control called the valueChange() ?
Not sure how to tell, but check what happens if you connect to the "void editingFinished()" signal. That might give you what you need
The editingFinished() is perfect when editing the text field. Its the valueChanged() signal I wish I could get more information about.
The trouble with valueChanged() is basically this:
The transaction of editing the text field really should "count" until either the user hits enter or the widget loses focus.
But if I modify the spinner, its a completed transaction every time I hit the button.