TreeView steal focus of ListView scroll



  • I use a ListView and inside each Item of this ListView, I have a TreeView .

    My problem is that when I want to scroll my ListView, if my mouse goes on the TreeView , the focus will change and the scroll will now be on the TreeView instead of the list.

    I would like that focus is set on the TreeView only if I click on it.

    Code example:

    import QtQuick.Controls 1.4
    
    ListView {
        id: list
        ScrollBar.vertical: ScrollBar {}
        ...
        model: DelegateModel {
            id:delegate
            model: myModel
            delegate : Rectangle {
                 id: rect
                 ...
                 TreeView{
                     id: spin 
                     ...
                 }
            }     
        }
    }
    

    How could I proceed ?


Log in to reply
 

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