set QListWidget/QTreeWidget icon size
hello,
is there a way to increase the icon size of items in a QListWidget/QTreeWidget? I tried increasing the font point size, but that only affected the text.
My QIcon images are quite large (eg 300x300), so they can afford to be larger than the default.
Richard
Re: set QListWidget/QTreeWidget icon size
You can call QAbstractItemView::setIconSize .
QListWidget/ QTreeWidget are inherited from QAbstractItemView
Re: set QListWidget/QTreeWidget icon size
thanks!
I found increasing the icon size like this causes the item icons to touch. So is there a way to add padding?
Re: set QListWidget/QTreeWidget icon size
And what do you mean by
Quote:
I found increasing the icon size like this causes the item icons to touch
??
May be you try setting the margin with style sheet... else other alternatives include using a custom delegate.
Re: set QListWidget/QTreeWidget icon size
With the default icon size there is space between the icons in adjacent items, but when I increase the icon size this space is not maintained so that the icons appear joined. Hope that makes sense.
I'll have a look into style sheets.