[Interest] QColumnView and QTreeView using same model

Michael Jackson mike.jackson at bluequartz.net
Tue May 3 21:57:15 CEST 2022

I have a custom QAbstractItemModel implementation that works correctly when using a QTreeView, i.e., I can open the complete hierarchy of the tree without any issues. I switched up to the QColumnView due to size constraints and now using the same exact instance of the model I can only navigate into the first item that has children. Other items at the root level that have children are shown with the little graphic arrow as having children but none of the children are actually listed in the next column over. I even put both the QTreeView and the QColumnView into my Widget at the same time with the same instance of the model and the QTreeView does not have any problems displaying the various levels.


Has anyone else seen something like this? I took at look at the Qt bug database and nothing really stuck out. I tried a QFileSystemModel for giggles and that worked as expected. So clearly I’ve got something sort of messed up in my custom model that allows the treeview to work but not the columnview. Odd.


Mike Jackson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220503/8d012de4/attachment.htm>

More information about the Interest mailing list