summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2015-03-30 10:20:07 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-04-04 12:24:44 +0000
commit5aa40e5b00eb8f54157bc1aa01205a8a87e0c661 (patch)
tree3796ef2c1d1c554d93fbdbd73b6d8ef596d7d6a5 /src/widgets/widgets/qcombobox.cpp
parentddb0628181ba6f2ebeedf7e8f4186861ab63b628 (diff)
QComboBox: also adjust size on model reset, with AdjustToContents
When the size adjust policy is QComboBox::AdjustToContents, the combobox sizeHint was recalculated on dataChanged, rowsInserted, rowsRemoved, and setModel, but not when the model was reset. This led to truncated items in the combobox when models are filled asynchronously. Task-number: QTBUG-5413 Change-Id: I3456c327d680dfffa58d6dcb26c79456c67b2a32 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 390478f911..76f923904d 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -226,6 +226,7 @@ void QComboBoxPrivate::_q_modelReset()
}
if (currentIndex.row() != indexBeforeChange)
_q_emitCurrentIndexChanged(currentIndex);
+ modelChanged();
q->update();
}