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

Problem with Listview in Listview

$
0
0
Hello, i have a main Page with a Listview, which allows me to switch between pages. Inside of a Page is another, smaller Listview. On the embedded linux system which Touch Input this dosen’t work. It seems that the outer Listview steals the touch events. On my desktop machine with mouse input it works correctly. Here is a code sample: main.qml import QtQuick 2.0   Rectangle {     width: 800     height: 400       ListModel{         id: qmlModel         ListElement { sourcePage: "Page1.qml" }         ListElement { sourcePage: "Page2.qml" }     }       ListView {         anchors.fill: parent         id: listView           snapMode: ListView.SnapOneItem         highlightRangeMode: ListView.StrictlyEnforceRange           model: qmlModel           delegate: Loader {             width: ListView.view.width             height: ListView.view.height             source: Qt.resolvedUrl(sourcePage)         }     } } Page1.qml import QtQuick 2.0   Rectangle {     anchors.fill: parent     color: "red"       ListView {         anchors.left: parent.left         anchors.top: parent.top         width: 400         height: 150         spacing: 5           model: Qt.fontFamilies()         delegate: Item {             height: 25; width: ListView.view.width             Text {                 anchors.centerIn: parent                 text: modelData;                 font.family: modelData                 font.pointSize: 20                 fontSizeMode: Text.Fit                 color: "black"             }         }     } } What can i do, that the example works on the touch screen? thanks

Viewing all articles
Browse latest Browse all 4972

Trending Articles