Right on, JPN, about my mistake on the local/member variables - that is now corrected.
So, I am now using:
void Window::calculate()
{
int valJ1 = valueSpinBoxJ1->value();
int valJ2 = valueSpinBoxJ2->value();
int X = valJ1+valJ2;
lcd3->display(X);
qDebug("X = %.4f",X);
}
void Window::calculate()
{
int valJ1 = valueSpinBoxJ1->value();
int valJ2 = valueSpinBoxJ2->value();
int X = valJ1+valJ2;
lcd3->display(X);
qDebug("X = %.4f",X);
}
To copy to clipboard, switch view to plain text mode
lcd3 is working (obviously), but I still get consecutively "X=0.0000". My worry is that if I need to use X somewhere else, it will not be there with the correct value - how should I deal with that?
Thanks for your help so far though!
X-man
Bookmarks