PDA

View Full Version : Check and Uncheck on a Dir Tree?



vishal.chauhan
3rd July 2007, 11:14
Hi All,

I m using Qt 4.1.5 on my MAC.
I have a little module in which I select the dir for which I have to make the Dir Tree and then add the hierarchical tree which include all the file and dir.

now I want to check and uncheck the file and Dir in such a way that every parent of a child should have its check state according to its child check state.


If any body knows then plz help me out.

Thanks.

jpn
3rd July 2007, 11:23
Take a look at thread: QDirModel+QTreeView and checkable items (http://www.qtcentre.org/forum/f-qt-programming-2/t-qdirmodelqtreeview-and-checkable-items-6957.html). All you have to do is to implement the custom checkstate logic in MyDirModel::data() and/or MyDirModel::setData().

vishal.chauhan
3rd July 2007, 12:55
Actually I have no Idea about QDirModel and donot know how I can show the tree with this code.

So plz explain me how I can combine this with my code and how I can do what I want.