PDA

View Full Version : Missing init signal



shenakan
20th August 2009, 15:10
I have a constructor of a widget whos inits the value of a spinBox. It is look like the first signal (to change the value) it is lost. What is the correct way to init a spinBox from a computed variable.

zeldaknight
21st August 2009, 00:45
Without actually looking at the docs (which I'm sure include the answer) I'd say it would be something like:

QSpinBox *x;
x = new QSpinBox(value);
where value is your computed variable.
Alternatively you could just use:

x->setValue(value);
or something along those lines.
Again, have a look at the documentation (http://doc.trolltech.com/).