PDA

View Full Version : tab e qwidget



mickey
4th June 2006, 21:56
Hi, I have a tabwidget; inside it some spinbox; I enable it, set spinbox values, and sometimes I need to disable it; is there a simple way to clear to '0' the spinbox values when I disable tab? (no spinbox->setvalue(0);)

wysota
4th June 2006, 22:14
What's wrong with setValue(0)?

mickey
4th June 2006, 23:16
nothing; it's the same problem; I must do 3 setValue for time (and code this for 8 tabs) :mad: (I hoped in a QT trick)

wysota
4th June 2006, 23:30
"Qt trick" would involve calling some method for every spinbox, so this wouldn't change anything. You can implement a method which will call setValue(0) for every spinbox in the group and just call this method when you want to clear all the boxes. Again, it won't change anything...

jacek
4th June 2006, 23:54
I must do 3 setValue for time (and code this for 8 tabs)
If you would subclass the tab and make it do what you want, you would have to write it only once.