Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TreeView steal focus of ListView scroll

TreeView steal focus of ListView scroll

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 398 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fheanor
    wrote on last edited by Fheanor
    #1

    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 ?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved