Use a PinchArea on ListView

  • Hello,

    I want to use PinchArea on ListView. Unfortunately, I think that the flickable function(office) of ListView is in conflict with PinchArea and I have to use 3 fingers so that PinchArea works correctly.

    This is an example of my code :

    import QtQuick 2.5
    import QtQuick.Controls 1.4
    import QtQuick.XmlListModel 2.0
    ApplicationWindow {
        id: app
        visible: true
        width: 640
        height: 480
        Component {
            id: rssDelegate
            Column {
                Label {
                    text: '<h2><b>'+ title+ '</b></h2>'
                    color: "steelblue"
                    wrapMode: Text.WordWrap
                    width: listview.width
                Label {
                    text: description + '<br>'
                    wrapMode: Text.WordWrap
                    width: listview.width
                Label {
                    text: "<i>PubliƩ le : " + pubDate + "</i><br><br>"
                    wrapMode: Text.WordWrap
                    width: listview.width
            anchors.fill: parent
            pinch.minimumScale: 0.1
            pinch.maximumScale: 5
            pinch.dragAxis: Pinch.XAndYAxis
        ListView {
            id: listview
            anchors.fill: parent
            anchors.margins: 5
            model: xmlModel
            delegate: rssDelegate
            id: xmlModel
            source: ""
            query: "/rss/channel/item"    
            XmlRole { name: "title"; query: "title/string()" }
            XmlRole { name: "pubDate"; query: "pubDate/string()" }
            XmlRole { name: "description"; query: "description/string()" }      

    I tried to use the property pressDelay ListView and also a MultiTouchArea to see if one or two fingers were used, but I still have the same problem.

    Have you an idea.

    Thank you in advance.


  • Hi,
    Did you solve this issue ?
    I am interessted, because I am facing the same problem.
    Thank you so much !


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.