1 Attachment(s)
incorrected QComboBox capture screen.
attached file : QComboBox capture.
apply code
Code:
// ICAO CD
cboIcao_cd->clear();
cboIcao_cd
->setModel
(ComboDataCollection
::getInstance().
getTableModel(icao_cdModel,
"TB_CNTRYCD",
QStringList() <<
"ICAO_CD"));
cboIcao_cd->setModelColumn(0);
// Combo box Height
cboIcao_cd->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
p
->setCompletionMode
(QCompleter::PopupCompletion);
p->setMaxVisibleItems(20);
cboIcao_cd->setCompleter(p);
cboIcao_cd->show();
The code execute, then QComboBox size is overflowed , like attached file.
What is incorrect it?
If someone has a simple example I'd greatly appreciate it.
Re: incorrected QComboBox capture screen.
You've set the max visible items on the completer popup, try setting setMaxVisibleItems(?) on your combobox.
Re: incorrected QComboBox capture screen.
I tried setting setMaxVisibleItems on my combobox, also QComboBox size is overflowed.
2 Attachment(s)
Re: incorrected QComboBox capture screen.
Using the code from your other thread the following worked:
Code:
comboBox->setMaxVisibleItems(5);
p->setMaxVisibleItems(3);