Hey people.
I'm trying to put decimals in a QDoubleSpinbox in run-time and it won't work. Should i maybe use an other widget?
What would be nice was if you could write the decimal point manually, but i don't know if there's any functionality for that.
Anybody have any answers?
the code i have at the moment in QDoubleSpinboxes (they're all in a vector to quickly set their values)
for(auto object : transformSpinBoxes)
{
object->setMaximumWidth(spinBoxWidthMax);
object->setMinimumWidth(spinBoxWidthMin);
object->setMaximum(10000);
object->setMinimum(-10000);
object->setSingleStep(0);
object->setDecimals(3);
// object->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
}
for(auto object : transformSpinBoxes)
{
object->setMaximumWidth(spinBoxWidthMax);
object->setMinimumWidth(spinBoxWidthMin);
object->setMaximum(10000);
object->setMinimum(-10000);
object->setButtonSymbols(QAbstractSpinBox::NoButtons);
object->setSingleStep(0);
object->setDecimals(3);
// object->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
}
To copy to clipboard, switch view to plain text mode
Bookmarks