Hi,
thank you for reporting this bug.
Here is a patch to fix it.
Best regards,
Thomas
==== //depot/qt/4.4/src/gui/widgets/qcombobox.cpp#15 -
d:\depot\qt\4.4\src\gui\widgets\qcombobox.cpp ====
@@ -2193,13 +2193,15 @@
bool boundToScreen = !window()->testAttribute(Qt::WA_DontShowOnScreen);
const bool usePopup = style->styleHint(QStyle::SH_ComboBox_Popup,
&opt, this);
-#ifndef QT_NO_TREEVIEW
+
{
int listHeight = 0;
int count = 0;
QStack<QModelIndex> toCheck;
toCheck.push(view()->rootIndex());
+#ifndef QT_NO_TREEVIEW
QTreeView *treeView = qobject_cast<QTreeView*>(view());
+#endif
while (!toCheck.isEmpty()) {
QModelIndex parent = toCheck.pop();
for (int i = 0; i < d->model->rowCount(parent); ++i) {
@@ -2207,8 +2209,10 @@
if (!idx.isValid())
continue;
listHeight += view()->visualRect(idx).height() +
container->spacing();
+#ifndef QT_NO_TREEVIEW
if (d->model->hasChildren(idx) && treeView &&
treeView->isExpanded(idx))
toCheck.push(idx);
+#endif
++count;
if (!usePopup && count > d->maxVisibleItems) {
toCheck.clear();
@@ -2218,7 +2222,7 @@
}
listRect.setHeight(listHeight);
}
-#endif
+
// ### Adjusting by PM_DefaultFrameWidth is not enough. Since
QFrame supports
// SE_FrameContents, QFrame needs API to return the frameWidths
listRect.setHeight(listRect.height() + 2*container->spacing()
_______________________________________________
Qtce-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qtce-preview-feedback