Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Swipe of listView is not working in loader



  • I have two qml files in which listview are defined in each. I have Loader where these two files get loaded based on flag.
    listView1.qml
    ListView {
    anchors.fill: parent
    ....
    focus: true
    model: model1
    delegate: delegate1
    }

    ListView2.qml
    ListView {
    anchors.fill: parent
    ....
    focus: true
    model: model1
    delegate: delegate2
    }
    Loader.qml
    Rectangle {
    id: rect
    Loader {
    anchors.fill : rect
    focus : true
    source : flag ? ListView1 : ListView2
    }

    Running qmlScene on individual ListView qml files works as expected but when Loader tries to load swipe does not work

    Thanks in advance



  • It might simply comes from rect dimension to not be defined.



  • I found the issue. There was MouseArea defined for Loader too, so on click, that MouseArea was getting triggered. I moved whole MouseArea to listview files, this seems to be working for me


Log in to reply