Hi
I implemented my own model and I'm trying to dislay it with QListView in the Icon mode. I want. The models' DecorationData returns pixmap which is not of the same size for all the items. some are larger, some smaller.
Now I want them to be laid out on a grid with the same space per item, so I set uniformItemSizes to true.. this resizes all the items to the smallest item size (see the screenshot)
The I tries setting grid Size to the size of the biggest item, but I cant find a good way to calculate the size for the text below the item, it's sometime quite long. so sometimes the text would get trimmed..
The i tried to make all the pixmaps returned by the model of the same size by scaling them:
but nothing changed - the size of the smallest icon did not change...Qt Code:
return pixmap.scaled(size, Qt::KeepAspectRatio);To copy to clipboard, switch view to plain text mode
So basically I tried a few approaches to layout differently sized icons with text on a QListView...Could you please suggest me a solution?
Thanks
Bookmarks