[Solved] List files like QFileDialog
-
Hi,
I have the "following":http://huxi.uw.hu/hidden/Qt/got.jpg (I know, it's bad :D) view. I would like to list the files I drag and drop / browse and add to the model like "this":http://huxi.uw.hu/hidden/Qt/want.jpg (with the option to switch detailed / normal mode). I was wondering if there was an easy way to achieve this. Currently I have my own subclass of QTreeView with drag and drop (the first, really bad looking one), and I tried to look for easy solutions (like QFileSystemModel), but none of them could achive this. So my questions are:
1: Is there an easy way to achive this view, or
2: How could I make the view look like the one in the picture (I mean the non-detailed list of files, the detailed is easy with QTreeView I guess, but I don't know how to make QListView have multiple columns like this).Thanks in advance!
-
You need using QListView class
for detailed / normal mode you can change viewMode property:@enum QListView::ViewMode@
bq.
QListView::ListMode -The items are laid out using TopToBottom flow, with Small size and Static movement
QListView::IconMode - The items are laid out using LeftToRight flow, with Large size and Free movement