Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
DecorationRole Icon spacing issues
scumpyt last edited by
I have have a bunch of different-sized icons that I'm using as the DecorationRole in a QListView.
I can't seem to figure out to ensure that all the Icons take up the same amount of space. To explain that a little better, what I really want is to set up the spacing such that all my DecorationRole icons occupy the same width and height, regardless of their actual size.
I tried QListView::setSpacing() and QAbstractItemView::setIconSizes(), but they didn't help.
Anybody have any other ideas?
Thanks in advance...
Madon last edited by
Idea : Use an icon with the maximal size needed.
PS : What type of class Model you are use ?