Cannot clear selection in GridView/ListView
Unsolved
QML and Qt Quick
-
Hello,
I want to clear the selection by clicking in the empty space of a GridView or ListView. I am using a a MouseArea that fills the GridView but is underneath the delegate items.
GridView { id: gridViewNodes anchors.fill: parent cellWidth: root.isSmallLayout ? 108 : 140 cellHeight: root.isSmallLayout ? 85 : 120 clip: true highlightMoveDuration: 100 reuseItems: true // unselect Item { anchors.fill: parent z: -1 TapHandler { // this is never been called onTapped: gridViewNodes.currentIndex = -1 } }
This worked until I port my application to Qt 6.8.1. But now, the event handler is never reached.
Any suggestions?
cheers
Tobias