PDA

View Full Version : What is the best way to create a file management panel?



DIMEDROLL
24th September 2008, 09:49
I need to create a widget, a file panel like in any file manager(Total Commander, Frigate, Far). This panel must contain a list of files in any directory. Double click will enter the dir clicked or "Go up" if ".." is clicked. Look at the attachement to see details.

What is the best way to create such widget? Can I use QDirModel or should I create my own model by subclassing QAbstractItemModel (or QStandardItemModel?) ?
I've read a documentation about Model/View programming. But it has too little of examples... I'll look at wiki to find more examples..

Also a need to create a virtual file panel. It uses a virtual tree of files, not a local filing system.
AFAIU QDirModel is not acceptable here.