PDA

View Full Version : Making QTreeView Items Checkable



JimDaniel
4th February 2008, 21:19
Hi, I'm trying to make a windows explorer-type interface for browsing the computer's filesystem. I found QDirModel and QTreeView to be excellent for this, however I need the ability to make the files and directories checkable, and then I need to be able to refer to what is checked and unchecked. How is something like this approached? Or is it even possible? Thanks, Daniel

jpn
4th February 2008, 21:21
Use the powerful searching functionality, please. :)

http://www.qtcentre.org/forum/p-qdirmodelqtreeview-and-checkable-items-post36858/postcount7.html

JimDaniel
4th February 2008, 21:31
Sorry, won't happen again. And thanks for the link, just what I'm looking for...

nitin82jain
30th January 2020, 16:06
I know this is a very old post, but by any chance does any one have any example for the same. I am not able to find the link provided above

d_stranz
30th January 2020, 17:43
Look at QAbstractItemModel::flags() and Qt::ItemFlag, along with QAbstractItemModel::data(), QAbstractItemModel::setData() and Qt::ItemDataRole.