PDA

View Full Version : Changing properties of a QComboBox's list view



verigySupport
15th January 2011, 00:29
A QComboBox pops up an QT internal class derived from QAbstractItemView to show all available items. How can I modify the properties of the list (specifically the item's padding).

Using style sheets I have individually tried each of the following:

QComboBox { padding: 6px; }
QComboBox QAbstractItemView { padding: 6px; }
QComboBox QAbstractItemView::item { padding: 6px; }
QComboBox QListView::item { padding: 6px; }
*::item { padding: 6px; }
* { padding: 6px; }

None affect the list items themselves. I even tried using the combobox's view() function and setting the QAbstractItemView's style sheet directly with no success.