PDA

View Full Version : how to clear spinbox values



Shien
2nd January 2011, 23:38
How to clear spin box value? I mean if current showing value is 5 but after clicking clear button it should go to 1. How to do this?

d_stranz
3rd January 2011, 00:27
QSpinBox::setValue( 1 ) should do what you want.

Shien
3rd January 2011, 09:35
nope. it doesn't. If it would I would not asked :D

BalaQT
3rd January 2011, 10:26
nope. it doesn't. If it would I would not asked

hi,
what u want? mention it clearly.
Bala

d_stranz
3rd January 2011, 16:14
nope. it doesn't. If it would I would not asked :D

So how are you connecting the clicked() signal from the clear button to the setValue() call on the spinbox? Do you even know if the connection is working? Have you used the debugger to see if clicking the clear button gets to the slot that resets the spinbox value?

You should probably show us some code.