View Full Version : QListWidget in iconMode with only 1 row

19th December 2009, 00:27

I'm building a little picture-viewer for a project. All it is supposed to do is show thumbnails of certain pictures in only one row.

I wanted to use a QListWidget in iconMode to display the thumbnails, so I don't have to implement too many methods (drag and drop etc.).
The problem is, as soon as I try to add more pictures than the widget's current width can show (i.e., make a scrollbar neccessary), the ListWidget arranges the items in multiple rows with as many columns as a row can show.

I've attached two screenshots. The first shows what I want it to do, the second what it actually does.

Is there any way to limit a QListWidget to only one row, or do I have to build that myself?

20th December 2009, 09:18
It's really simple.