How to adjust QComboBox view max height?
Solved
General and Desktop
-
The anemic 132 pixel default max height is too small. I want the height to vary between 0 and 400 pixels depending on the amount of items.
AComboBox::AComboBox(QWidget *papa, size_t length) : QComboBox(papa) { setFixedWidth(length); view()->setMinimumWidth(ALineEdit::GIANT); view()->setMaximumHeight(400); }
Above code has no effect and if I use min height instead then there is lots of blank space if too few items exist.
-
Hi
Not a direct answer but have you looked at
http://doc.qt.io/qt-5.5/qcombobox.html#maxVisibleItems-prop