Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.13.2
-
None
Description
If you create QSpinBox without parent in its constructor, then its minimum size will be very large. It seems that it happens because QAbstractSpinBox::minimumSizeHint calls sizeFromContents which tries to determine size for up-down buttons in QCommonStyle::subControlRect using current widget size. As real widget size is not updated yet, it uses default values of 100x30 for widgets with parent in constructor and 640x480 for widgets without, leading to very large minimum size. Anyway, the fact that minimumSizeHint depends on current widget size and does not invalidate itself on size change is very strange.
Attached small example of this behavior.
Attachments
Issue Links
- duplicates
-
QTBUG-79806 [REG 5.12.5 -> 5.13.2] QDoubleSpinBox sizeHint() way too wide
-
- Closed
-