PDA

View Full Version : Qt4.2.2 QDoubleSpinBox QSpinBox



TheKedge
12th January 2007, 13:38
Hello all,
I have a problem with QDoubleSpinBox. I need an editable spin box BUT I don't want valueChanged(double) to be emitted until I have pressed enter. How can I do it? (Is sub-classing really the only way?)

example I have a value off 123.4 in the spin box. If I delete the three, the box emits signalChanged(12.4). The spin box controls some electronics and I can't have wild signal changes like that.

thanks,
K

jacek
12th January 2007, 14:21
How about connecting to the QAbstractSpinBox::editingFinished() signal?

TheKedge
12th January 2007, 14:30
yes, but I'd also like to use the arrows. I'm using the valueChanged(double) to catch an arrow pressed event, but that's being triggered on a 'half edit' too.

I need valueChanged(double) event on step up/down (with the arrows) and on editingFinished() but not during editing.

suggestions?

thanks
K

wysota
12th January 2007, 14:36
Looks like you'll have to subclass after all :)

Sebastien
15th October 2007, 21:27
Hello TheKedge,

Sorry to bother... I know that your post regarding SPINBOX didn't have any reply since January, but I'm just wondering what was your solution / workaround of the issue.

I have exactly the same problem as you have describe, but for me, I'm taking to one of our Optical Power Meter, so we can't just send garbage signal out.

Anyway, any help will be greatly appreciated...

- Sebastien