Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.7.1, 5.9.4, 5.11.1
-
None
Description
Observed specifically with QDoubleSpinBox (but most likely not limited to that).
Typed/shown in Designer properties editor (decimals is default of 2):
minimum: -21474836.450000 maximum: 21474836.650000
XML (.ui file):
<widget class="QDoubleSpinBox" name="A3"> ... <property name="minimum"> <double>-21474836.449999999254942</double> </property> <property name="maximum"> <double>21474836.649999998509884</double> </property> </widget>
Generated C++:
A3->setMinimum(-2.14748e+7); A3->setMaximum(2.14748e+7);
The result is incorrect min/max values. Workaround is to set them manually in C++ after UI setup.
I'm guessing this is caused by
uic/cpp/cppwriteinitialization.cpp:1410
case DomProperty::Double: propertyValue = QString::number(p->elementDouble()); break;