Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.11, 6.2.6, 6.4.1
-
None
Description
When a QComboBox has "AdjustToContents" set and model data is dynamically added/changed the minimum size hint of the QComboBox is not updated.
This is not the case for the normal size hint, which is correctly updated every time the model changes.
The only trigger that can cause the minimum size hint to be recalculated is a StyleChange event. I could not find any other place where the cached minimum size hint is cleared.
How to reproduce with the provided example:
(you can hover over combo box to see the current minimum size hint)
1) start the application and click the "insert item" button
combo box stays the same width because the minimum size hint is not updated
2) click on the "style change event" button
combo box is resized to correct size because the event has trigger a recalculation of the minimum size hint