Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
listing directory contents with project heading
Hi,
I am new to Qt prgramming. I have requirement to list the directry structure of different projects folders like
+ projects
|
+ Qt project
|
+ c:\Qt ## actual directory listing starts here
|
....
+ Qtopia prject
|
+ d:\Qtopia ## actual directory listing starts here
|
....
I know i can use the QDirModel, but that doesnt give the required.
here
1. these derectories are from different drives
2. the first item should be "projects"(can take anyother value)
3. the next immediate items will be names of the projects
can anybody help me? expecting piece of code also
This is what I know:
I need to subclass the QAbstractItemModel to implement this. I need to return the data depending on the defferent depth. Here my question is how to find the depth of an index in this case and how to map the index of my model to QDirModel index
thanks in advance