Stylesheet for the arrows on the QListView of a QCombobox
-
I'm trying to create a stylesheet for a QCombobox and this is the QListView that pops when I select the QCombobox. How can I style those arrows on the top and bottom of the list?
I found references to the arrows on QScrollBar, but i can't find references to these two. -
I'm trying to create a stylesheet for a QCombobox and this is the QListView that pops when I select the QCombobox. How can I style those arrows on the top and bottom of the list?
I found references to the arrows on QScrollBar, but i can't find references to these two.@CDieguez https://doc.qt.io/qt-6/stylesheet-examples.html
See "Customizing QComboBox" -
@CDieguez https://doc.qt.io/qt-6/stylesheet-examples.html
See "Customizing QComboBox"@jsulm Sorry, I'm just not seeing it.
I'm already styling "QComboBox::down-arrow" and "CComboBox::drop-down" to make the combobox look like this.
For smaller lists, those arrows don't appear and it looks fine.I styled "QComboBox QAbstractItemView { " to set the padding, background color, selection color, item selection border for the itens on the ListView.
The only things in the example I'm not using are the "on" and "editable" states. I'm not planning on allowing the user to edit the combobox and I don't want it to look different if it's on or not.
To see if I could change the color of those arrow buttons to red, I literally tried styling something similar to the example below for every sub-control on the List of Sub-Controls in this link https://doc.qt.io/qt-6/stylesheet-reference.html#sub-line-sub, but nothing changed those two buttons.
"CComboBox::down-arrow {" "background-color: red;" "}" "CComboBox::float-button {" "background-color: red;" "}" "CComboBox::indicator {" "background-color: red;" "}" ...
I'm just looking for the name of these sub-controls or if they should be addressed as another class instead of a sub-control. I really would appreciate an example like the ones above that could turn those two arrows red or set an image or change them in any way.