View Full Version : QComboBox pop-up styling

20th February 2012, 09:03
Hello. I'd like to know what is the way to customize QComboBox pop-up via QSS. Namely I want to remove the corners of the pop-up area, because in my case it is rounded.

This is the code I tried:

QWidget#myParentWidget QComboBox QAbstractItemView
border-radius: 15px;
background-color: red;

It produces the result like this:
Although pop-up is rounded and filled with the proper background color there is still something in the background that I can't remove.

Also I'd like to know if it is possible to apply QSS style to the items of the pop-up area. The following code doesn't work:

QWidget#myParentWidget QComboBox QAbstractItemView::item
border-color: green;

21st February 2012, 12:15
I don't think you can do either.
I guess you know this (http://doc.qt.nokia.com/4.7-snapshot/stylesheet-examples.html#customizing-qcombobox) page.