You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 2nd 2016, 2:17am

QComboBox indentation for items

Hi,

is it possible to have indentation/padding/margin for items in the QComboBox popup?

Something like this:


Source code

1
2
3
4
5
6
[ ComboBox ] // The actual QComboBox
   Item A
   Item B
      Item B Sub 1
      Item B Sub 2
    Item C



Basically a faked tree-view structure. I need the icons to be indented as well, so adding just a couple spaces in front of the text per item doesn't do the trick :(

Any way to do this?

Cheers,
Aya