How multiply two SpinBox, and print result in QLabel?
If you can give some example?
How multiply two SpinBox, and print result in QLabel?
If you can give some example?
QSpinBox::value(), QLabel::setText() and some very, very basic C++. What have you tried?
Surely there is more to this question.
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
}
Bookmarks