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

Is it OK to use multiple stackviews in an application?



  • Hello! Do not know if it is Ok from design patterns point of view to use multiple stackviews.
    For instance I have main menu which contains two child menus. One of the child menus contains another menus.
    Image
    Thank you.


  • Moderators

    @MikhailG Where are you loading the menus ?



  • @p3c0 Thank you for your reply. I`m loading them in main.qml.

    ApplicationWindow {
        id:aplWin
        minimumWidth:  1280
        maximumWidth: minimumWidth
        minimumHeight: 1024
        maximumHeight: minimumHeight
        visible: true
    
        StackView {
            id: stackView
            anchors.fill: parent
            initialItem: SignInWin {}
        }
    }
    

    If autorization was successful than I want to load a Page that contains for buttons that represent another four pages and navigate among them using the StackView

    I hope I cleared that out.


  • Moderators

    @MikhailG so it you have a requirement as such then you have to go that way. May be you can try other alternatives to StackView but I guess there wont be. Check if you can settle with ListView.
    Also do you have any specific issues or errors if you go that way ?



  • @p3c0 OK, thank you, I guess I will go this way.
    As for errors, well everything works fine for now.


Log in to reply