Seems easy, but doesn't work for some reason...

I have a Qspinbox and I am trying to get its value and assign it to a variable. The code seems simple, as in:

int value1;
value1=valueSpinBox1->value();
qDebug("Value1 = %.4f", value2);

The qDebug was added in order to check if value1 gets the value of the spinbox. I get no errors or warnings, but I also don't get any message in the debug window, so I assume that the value is not passed on.

Right below that, I have a connection between the valueChanged signal of the spinbox and the display slot of an LCD, and it works just fine.

Basically, I need to take the values of five spinboxes and eg. add them and get a result.

Any suggestions? Thanks in advance.