Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.5.2
-
None
-
5aa40e5b00eb8f54157bc1aa01205a8a87e0c661
Description
Note: lemma@confuego.org: 08/24/09 07:58:25 PM:
Name
Michael Leupold
Your E-Mail Address
lemma@confuego.org
Product
Qt
Function
Layout
Version
4.5.2
Platform
Linux
Platform details
Compilers
GCC
Compiler details
Subject
QComboBox sizeHint not updated on resetting the model
Steps to reproduce / test case
1. Create a QComboBox
2. Set its sizeAdjustPolicy to AdjustToContents
3. Set a custom model on the combobox
4. Call reset() on the model
Expected outcome: The combobox adjusts its size to the new content
Actual outcome: The size stays the same
More information
Attached test-case illustrates the behaviour by creating 3 comboboxes:
1. The first uses a model that resets itself and doesn't resize.
2. The second uses beginRemoveRows()/endRemoveRows() to force invalidation of the sizeHint.
3. The third doesn't have a model but uses addItem, then clear() and addItem again.
1. shows the bug, 2. and 3. resize correctly. I would have expected all 3 to behave the same.
(see main.cpp)