Swipeview Within Loader Issue



  • I am trying to use a Swipeview component within a Loader component. I am finding that when used within the Loader, the Swipeview appears but does not allow me to actually swipe between items. See examples below:

    Swipes:

    SwipeView {
        currentIndex: 1
        anchors.fill: parent
        Item {
            Rectangle {
                width: 50
                height: 50
                color: "Blue"
            }
        }
        Item {
            Rectangle {
                width: 50
                height: 50
                color: "Red"
            }
        }
    }
    

    Does not swipe:

        Loader {
            sourceComponent: swipe
        }
    
        Component {
            id: swipe
            SwipeView {
                currentIndex: 1
                anchors.fill: parent
                Item {
                    Rectangle {
                        width: 50
                        height: 50
                        color: "Blue"
                    }
                }
                Item {
                    Rectangle {
                        width: 50
                        height: 50
                        color: "Red"
                    }
                }
            }
        }
    

Log in to reply
 

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