Well, just use QComboBox::insertSeparator(int index) that would insert a separator, in your example the index would be 5, so
that would make all the jobQt Code:
ui->comboBox->insertSeparator(5);To copy to clipboard, switch view to plain text mode![]()
Well, just use QComboBox::insertSeparator(int index) that would insert a separator, in your example the index would be 5, so
that would make all the jobQt Code:
ui->comboBox->insertSeparator(5);To copy to clipboard, switch view to plain text mode![]()
Normally, I would. But the QInputDialog::getItem() builds the combo box directly from the QStringList. I believe this is an oversight that needs to be addressed, rather than something I am missing.
You can insert the separator after creating the combo, you will need calculate where do you want to insert it and calculate the index. just that!
Bookmarks