[Qt-interest] Help with QCombBox Stylesheet

Jake Colman colman at ppllc.com
Wed Jun 22 16:20:05 CEST 2011


I am trying to use a stylesheet to increase the spacing between items in
the dropdown list.  If I understand correctly, I should be able to do
this by styling the item's of the QAbstractItemView as follows:

  this->setStyleSheet( "QAbstractItemView::item { padding: 10px }" );

Unfortunately, this has no effect.  What am I missing?

Incidentally, something like this:

  this->setStyleSheet( "QAbstractItemView { 
           selection-background-color:lightgray; } )

works fine to style the dropdowb list itself.  Buw how do I style the
spacing for the items in the list?

Thanks.

...Jake


-- 
Jake Colman | Director, Software Development
Principia Partners LLC
101 West Elm Street | Conshohocken | PA 19428 | +1 (610) 755 9770
t: +1 (610) 755 9786 | c: +1 (610) 348 2788 | f: +1 (201) 221 8929
e: colman at ppllc.com | w: www.principiapartners.com
Credit technology innovation awards winner 2008, 2009 & 2010




More information about the Qt-interest-old mailing list