From 5aa40e5b00eb8f54157bc1aa01205a8a87e0c661 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 30 Mar 2015 10:20:07 +0200 Subject: 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 Reviewed-by: Marc Mutz --- src/widgets/widgets/qcombobox.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/widgets/qcombobox.cpp') 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(); } -- cgit v1.2.3