PDA

View Full Version : How to make a file browser like explorer?



alexivanov91
18th August 2010, 10:03
Hello,

I would like to make file browser widget exactly like Windows Explorer, with icons, thumbnails preview etc.

Which is the best way to achieve this?

In qt I only found the tree view explorer like sample so far... I would like something similar to QFileDialog content window.

Thank You,
Alex

Lykurg
18th August 2010, 10:29
You have to compose the window yourself containing: QTreeView, QTableView, And QLabel, QComboBox etc.

alexivanov91
18th August 2010, 10:47
That socks...

Lykurg
18th August 2010, 11:06
That socks...
Do you mean rocks or sucks? If the later then why? Simple put the widgets in a layout have a QFileSystemModel in the background and all is fine. Even for an unexperienced user it is doable within - let's say - three hours.

alexivanov91
18th August 2010, 11:26
I saw indeed that setting QFileSystemModel is pretty straight-forward. My real problem is generating icon previews the way explorer does in "thumbnails" mode. I've tried this in QListVIew with IconMode set, but this wasn't enough...

Lykurg
18th August 2010, 11:52
No, for that you have to provide your own delegate (QItemDelegate/QStyledItemDelegate) which loads the loads the image and displays it.