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

Swipe View with ListPages



  • Hi,

    I'm trying to create SwipeView with ListPage, but I have noticed that it's not possible to create SwipeView with any type of Page component.

    AppTabBar {
            id: appTabBar
            contentContainer: swipeView
    
            AppTabButton { text: "First" }
    
            AppTabButton { text: "Second" }
        }
    
    Quick2.SwipeView {
            id: swipeView
            width: parent.width
            anchors.top: appTabBar.bottom
            anchors.bottom: parent.bottom
            clip: true
    
            FirstPage { }
            SecondPage { }
        }
    
    

    Both FirstPage and SecondPage contains ListPage component.
    Application crashes when this code is executed. When I change "FirstPage" and "SecondPage" to other QML Components like Item or Rectangle it works perfectly. Unfortunately, when I place ListPage inside a Rectangle component then page is not refreshed and doesn't display ListPage that is inside.
    Is there a way to overcome this issue? I couldn't find an answer anywhere. I don't want to use StackLayout, it's not possible to swipe it.

    Thanks.


Log in to reply