当用户单击应用程序图标时,我想显示一个启动页面。为此,我创建了工作表并附加到页面。 main.qml
import bb.cascades 1.0
Page {
Container {
Label {
text: "Home page"
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
}
}
attachedObjects: [
Sheet {
id: mySheet
content: Page {
Label {
text: "Splash Page / Sheet."
}
}
}
]//end of attached objects
onCreationCompleted: {
//open the sheet
mySheet.open();
//After that doing some task here.
---------
---------
---------
//Now I'm closing the Sheet. But the Sheet was not closed.
//It is showing the Sheet/Splash Page only, not the Home Page
mySheet.close();
}
}//end of page
完成工作后,我想关闭工作表。所以我调用了 close() 方法。但是工作表没有关闭。
如何在 oncreationCompleted() 方法或任何 c++ 方法中关闭工作表?