Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Handling and ignoring events

$
0
0
It propagates the wheel too. Modified the above example import QtQuick 2.4 import QtQuick.Controls 1.3   Rectangle {     width: 200     height: 400       StackView {         id: stack         initialItem: view           Component {             id: view             MouseArea {                 ListModel {                     id: model                 }                 ListView {                     anchors.fill: parent                     model: model                     delegate: Text {                         text: name                     }                 }                 Component.onCompleted: {                     for(var a=0;a<50;a++) {                         model.append( { "name":a } )                     }                 }                 onClicked: console.log("inner clicked")             }         }     }       MouseArea {         anchors.fill: parent         propagateComposedEvents: true         onPressed: { console.log("outer press") }         onReleased: { console.log("outer released") }     } } It detects press,release and also the ListView scrolls.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images