QComboBox Popup Hover Style [SOLVED]
-
Is there really no way to have the stylesheet affect individual items in the list view that pops up when you click on a combo box?
I tried this:
@
QComboBox QAbstractItemView::item:hover {
background: red;
}
@but it doesn't work.
-
Try this.
@ QComboBox combo;
QListView * listView = new QListView(&combo);
combo.addItem("pthinks.com");
combo.addItem("Bangaluru");
combo.addItem("india");
combo.addItem("dheerendra");
listView->setStyleSheet("QListView::item:hover {
background: red }
");combo.setView(listView); combo.show();@
-
This works! Thank you so much!
These Qt quirks drive me crazy! -
You can move this to SOLVED state by editing your question.