[Interest] QtQuick Controls2 : Does StackView garbage collect popped items ?

ekke ekke at ekkes-corner.org
Sat Feb 24 11:17:49 CET 2018


Am 24.02.18 um 10:15 schrieb jack ma:
> It seems that StackView instantiate QML components when push and
> destroy it when pop, so we cann't get information from previous page.
you have access to the Page before it will be destroyed.
All my Pages have a name property so I can check which Page it is
per ex:

// StackView
function popOnePage() {
    var page = pop()
    if(page.name === "MyAddressPage") {
        // access to properties
        var d = page.theCity
        // access to functions
        var x = page.getData()
        return
    }
}


ekke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180224/764198f0/attachment.html>


More information about the Interest mailing list