[GUI] Make precision of QuantitySpinBox accessible from Python

This commit is contained in:
xtemp09
2026-02-16 11:13:52 -06:00
committed by Chris Hennes
parent bc3c0dc19a
commit f1d79d9ab4
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -886,6 +886,7 @@ void QuantitySpinBox::stepBy(int steps)
}
Quantity quant(val, d->unitStr.toStdString());
quant.setFormat(d->quantity.getFormat());
updateText(quant);
updateFromCache(true);
update();
+1
View File
@@ -46,6 +46,7 @@ class GuiExport QuantitySpinBox: public QAbstractSpinBox, public ExpressionSpinB
double singleStep READ singleStep WRITE setSingleStep
) // clazy:exclude=qproperty-without-notify
Q_PROPERTY(double rawValue READ rawValue WRITE setValue NOTIFY valueChanged)
Q_PROPERTY(double decimals READ decimals WRITE setDecimals)
Q_PROPERTY(Base::Quantity value READ value WRITE setValue NOTIFY valueChanged USER true)
Q_PROPERTY(
QString binding READ boundToName WRITE setBoundToByName