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. QML TreeView - handle Keyboard array events
Forum Updated to NodeBB v4.3 + New Features

QML TreeView - handle Keyboard array events

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 227 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.
  • Pieter CardoenP Offline
    Pieter CardoenP Offline
    Pieter Cardoen
    wrote on last edited by
    #1

    Dear

    I am currently trying to work an application with on the left side, a tree view and on the right size detailed info on the selected item.

    Currently I'm able to catch the mouse event in the rowDeleagete:

    rowDelegate : Rectangle{
        color: styleData.alternate  ? "white" : "#ffeeeeee"
        height: treeview.rowHeight
    
        MouseArea {
            anchors.fill: parent
            propagateComposedEvents: true
            onPressed: {
                __root.selectedItem = model
                console.log(model)
                mouse.accepted = false;
            }
            onReleased: mouse.accepted = false;
            onPositionChanged: mouse.accepted = false;
            onPressAndHold: mouse.accepted = false;
        }
    }
    

    I am however not able to catch the keyboard event in the rowDelegate. It has been processed by another element already. The keyboard event can however be processed in the TreeView element but in that case, I don't find a way to access the selected item model data.

    Can anyone assist me in this?
    Kind regards
    Pieter Cardoen

    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