Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93014

TreeView: create separate TreeViewDelegate

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None

      Create a TreeViewDelegate that can be more easily styled from the platform / app. The idea is that you can then do:

      TreeView {
          delegate: TreeViewDelegate {
              TreeView.isExpanded: true
              indicator: Text{ text: TreeView.isExpanded ? "-" : "+" }
              icon: TreeView.isTreeColumn ? model.icon : null
              text: model.display
              alternateRows: false
          }
      } 

      But should it use one delegate for the tree, and another for the other columns? Or use TreeView.isTreeColumn?

      Should TreeViewDelegate set icon and text from the model by default?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            richard Richard Moe Gustavsen
            richard Richard Moe Gustavsen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes