Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.2.1
-
Windows 7, Linux, Mac
-
ab556d6b321bb02cec2a0c0705b1212377fde095 (qtbase/5.4, 22.10.2014, 5.4)
Description
QCombobox calculates container listview height wrong in QComboBox::showPopup() when spacing is used. Bug is visible in the end of the dropdown list when there's more than 3 items. Visual effect is empty space after last item.
main.cpp
#include <QApplication> #include <QComboBox> #include <QListView> int main(int argc, char *argv[]) { QApplication a(argc, argv); QComboBox* cb = new QComboBox(); (qobject_cast<QListView*>(cb->view()))->setSpacing(4); int numOfItems=5; for(int i=0;i<numOfItems;i++) cb->addItem("item " + QString::number(i+1)); cb->show(); return a.exec(); }