Hello,

I need some help using the QTreeView.
I'm having problems fitting my datastructure into QT4s Interview MVC framework.

Let my explain you what I want to do:
I have a couple of files saved in an array which looks basically like this:

Qt Code:
  1. struct file
  2. {
  3. string absoluteFilename; // Eg. "/var/foo/xx.log"
  4. };
  5. vector<file> _files;
To copy to clipboard, switch view to plain text mode 

Now I want to present this vector of files in a tree widget. My question is: How can I map this array of filepaths to the QAbstractItem (row, column) access? I want to show every folder as a node, and each file as a leaf.
I've thought about this problem for quite some time, but all I can think of is some really ugly mess of alot of code.
There must be some easy way to integrate a filestructure (not using QDirModel, because the files are scattered over several locations) into a tree.

Thanks for help,
Bye, Jojo