0

I'm using this code to load a page

            onClicked:
            {
                creationDetailsSheetLoader.source = "CreationDetailsPage.qml"
                creationDetailsSheetLoader.item.reset()
                pageStack.push(creationDetailsSheetLoader.item)
            }

I'd like to have the data

property string iconPath: ""
property string iconName: ""
property string appNameString: ""
property string desktop: ""

reset after each exit from the page

I have components properties set this way

                text: ( desktop == "" ) ? "No app selected" : desktop

If I do

function reset()
{
    iconName = ""
    iconPath = ""
    appNameString = ""
    desktop = ""
}

and call this onLoaded of the loader, the component properties, as the above specified stay the same What am I doing wrong? Or is there any easy way of resetting the page to the initial state

Thanks in advance

4

1 回答 1

0

问题是我删除了属性绑定,就像那样

entryName.text = "somestring"
于 2012-09-04T14:20:49.523 回答