QML plasmoid, pageStack.pop() doesn't work
Gao Xiang
qasdfgtyuiop at gmail.com
Thu Jul 12 10:24:18 UTC 2012
The sample qml is easy:
======================================================
import QtQuick 1.1
import org.kde.plasma.components 0.1 as PlasmaComponents
Item {
PlasmaComponents.PageStack {
id: pageStack
anchors.fill: parent
initialPage: [ c, b, a ]
}
PlasmaComponents.Page {
id: a
anchors.fill: parent
PlasmaComponents.Label{ text: "a" }
onStatusChanged: if(status==PlasmaComponents.PageStatus.Active)
pageStack.pop();
}
PlasmaComponents.Page {
id: b
anchors.fill: parent
PlasmaComponents.Label{ text: "b" }
onStatusChanged: if(status==PlasmaComponents.PageStatus.Active)
pageStack.pop();
}
PlasmaComponents.Page {
id: c
anchors.fill: parent
PlasmaComponents.Label{ text: "c" }
}
}
======================================================
I wish to get a "c" in screen. But I got a "b". What's wrong? Why the
second pageStack.pop() doesn't work?
Thanks.
More information about the Plasma-devel
mailing list