Select only item in TreeView



  • Hi!

    I have next TreeView in QML:

    TreeView {
        id: tree
        width: 300
        model: pgItemModel
        headerVisible: false
    
        TableViewColumn {
            resizable: true
            role: "display"
        }
    }
    

    When user selects a tree item, entire row will be highlighted:
    Full row selection
    But better if only tree item will be highlighted, as in the following example:
    Item selection
    How can I do this?
    Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.