-
"Icon grid"
Hello,
How could I make an "icon grid"?
I do not know how to say it better. I would like to set icons or simply labels on a grid. The aim is to have something that looks like, for example, the contents of a folder displayed in konqueror where every file appears as an icon. I would also need these elements to be clickable.
I have found no easy way to do this but I assume that there must be a simple way to do it.
Thank you!
-
Re: "Icon grid"
-
Re: "Icon grid"
Thank you!
Initially, I had done it with QGridLayout but I was hoping (without being able to find it) that there would be something more simple where I could just "throw" the items I wanted to display and that their organisation would be automatic in case the use resized the window for example.
-
Re: "Icon grid"
Use QListView with your model (like QStandardItemModel or your own implementation) or QListWidget and use QListView::setViewMode() to set the mode to QListView::IconMode.
-
Re: "Icon grid"
Thanks!
I had used QtAssistant and searched in google but did not find what I needed.
I have reached the same conclusion as you did. I am now doing it in a QListWidget and icons. That way, the layout of the entries will be nicely set up automatically.