Important: Please read the Qt Code of Conduct -

Code example of item selector TreeView + splitter + item details pane GUI similar to Windows file explorer ?

  • I am seeking code examples for a GUI similar to the Windows File Explorer, however, my application is not a file viewer. I am trying to create a GUI with:

    • Two panes separated by a vertical splitter.
    • The left pane is the navigator tree view
    • The right pane displays properties of item selected by navigator.
    • Details of the item selected in the left navigation pane are displayed in the item details on the right

    Several times I have tried the TreeView QAbstractItemModel approach when starting a new project. This feels like the right approach yet I find it hard to understand. When I put a break point where item data is retrieved there seems to be a lot of constant calls to retrieve the model's item data even when GUI is just sitting there without focus. How would you connect an item selected in the left navigation pane to the details pane?

    I keep resorting to implementation using TreeWidget and QTreeWidgetItem as it seems easier to understand the implementation.

    Thanks in advance for tips or suggestions,


Log in to reply