Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.5.0
-
None
Description
Setting a QTreeView or QTableView as the popup of QComboBox gives an bad result on Mac OS X, GTK or with the CleanLooks style. Navigation in the view is not possible horizontally and the size of the popup is ignored.
Here is an example to reproduce the problem:
#include <QtGui> int main(int argc, char **argv){ QApplication app(argc, argv); QTreeView *tree = new QTreeView(); QStandardItemModel model(50, 4); for (int row = 0; row < 50; ++row) { for (int column = 0; column < 4; ++column) { QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column)); model.setItem(row, column, item); } } tree->setMaximumHeight(500); tree->setMinimumHeight(500); QComboBox combo; combo.setView(tree); combo.setModel(&model); combo.show(); return app.exec(); }