Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Send a parameter from one NavigationStack to another NavigationStack

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25101

    Victor Manuel

    I need to send a parameter from one NavigationStack to another NavigationStack, is it possible to do it? So far I have tried everything, but to no avail. I would appreciate any help, thanks…

    NavigationItem {
                id: homeNavigation
                title: "Inicio"
                iconComponent: homeIcon
    
                NavigationStack {
                    id: initStack
                    initialPage: Splash { }
                }
            }
    
    NavigationItem {
                id: configNavigation
                title: "Configuracion"
                iconComponent: configIcon
    
                NavigationStack {
                    id: configStack
                    initialPage: Configuracion { }
                }
            }

    I need to send a parameter from a page contained in initStack to the initialPage of configStack

    #25110

    Alex
    Felgo Team

    Hi Victor,

    a direct dependency between such pages is usually not the best idea (also since they are lazy loaded on demand, they are not directly accessible via their id outside their scope). I would recommend to introduce a logical “Controller” item on the root level of your app, which can be called from anywhere and can also notify any other pages then using signals.

    We also have a in-depth guide on model/view separation here: https://felgo.com/doc/apps-howto-model-view-separation/

    Best,
    Alex

    #25112

    Victor Manuel

    Thank you Alex, i look this example. For the moment i resolv with app.settings(key, value)

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded