[Qt-interest] QComboBox MaxVisibleItems set.
minsoub Jung
minsoub at gmail.com
Wed Feb 24 12:11:06 CET 2010
OS : Linux
Qt : 4.6.0
I tried setting MaxVisibleItems of QComboBox.
I tried coding something like :
Qt Code:
==================================================
QComboBox *combo = new QComboBox;
combo->setModel(queryModel);
combo->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
// MaxVisibleItems set
QCompleter *p = new QCompleter(queryModel);
p->setMaxVisibleItems(20);
combo->setCompleter(p);
combo->show();
==================================================
The code execute, then QComboBox Size is overflowed and it's height
exceed screen size.
QComboBox item count is 300.
Why does't it display so MaxVisibleItem as I'm setting?
What is incorrect it?
please, Somebody help me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100224/d96dc2a2/attachment.html
More information about the Qt-interest-old
mailing list