[Interest] QColumnView and QTreeView using same model
Scott Bloom
scott at towel42.com
Tue May 3 22:41:25 CEST 2022
Have you run the modeltest on it?
Scott
From: Interest <interest-bounces at qt-project.org> On Behalf Of Michael Jackson
Sent: Tuesday, May 3, 2022 12:57 PM
To: Qt Interest List <interest at qt-project.org>
Subject: [Interest] QColumnView and QTreeView using same model
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/6cd80d01/attachment.htm>
More information about the Interest
mailing list