View Full Version : The problem with the transfer of value
flytracer
20th April 2011, 23:17
How multiply two SpinBox, and print result in QLabel?
If you can give some example?
ChrisW67
21st April 2011, 00:10
QSpinBox::value(), QLabel::setText() and some very, very basic C++. What have you tried?
Surely there is more to this question.
flytracer
21st April 2011, 00:35
I have this situation
void autogentest::createValAG()
{
ValAGGroup = new QGroupBox(tr("Parameters Autogenerator"));
ValAGGroup->setFixedSize(200,500);
QLabel *Labell = new QLabel(tr("Enter a value l"));
QSpinBox *SpinBoxl = new QSpinBox; //The values of two SpinBox multiply
SpinBoxl->setRange(-100, 100);
SpinBoxl->setSingleStep(1);
QLabel *LabelR = new QLabel(tr("Enter a value R"));
QSpinBox *SpinBoxR = new QSpinBox;
SpinBoxR->setRange(-100, 100);
SpinBoxR->setSingleStep(1);
SpinBoxR->setValue(0);
}
void autogentest::createEdit()
{
EditGroup = new QGroupBox(tr("Resolt"));
EditGroup->setFixedSize(500,500);
LabelH = new QLabel; //And the result is print here
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.