我是新的黑莓10开发。我已经创建了一个按钮,但我无法完成从当前屏幕到下一个屏幕的推屏功能。下面是我使用的代码:
onClicked:{
navigationPane.push(firstPage);
}我还实现了一个选项卡
TabbedPane {
activePane: Page {
Label {
id: label
text: "What do you like more, kittens or puppies?"
}
}
sidebarState: SidebarState.VisibleCompact
onActiveTabChanged: {
}
Tab {
title: "Puppies"
onTriggered: label.text = "kittens"
NavigationPane {
id: navigationPane
//how to call a screen from this,i got stuck with this,can any some send me simple code for pushing a screen.?
}
}
Tab {
title: "Kittens"
onTriggered: label.text = "I love kittens!"
NavigationPane {
id: navigationPane
> **`//how to call a screen from this,i got stuck with this,can any some send me simple code for pushing a screen.?`**
}
}
}在这个选项卡中,我想做一个推屏功能,同时点击标签的图标。有人能帮我做这两件事吗?
谢谢。
发布于 2013-02-11 07:51:51
下面是为不同屏幕创建选项卡的示例,您将在主选项卡中进入下一个qml,如下所示
Tab {
title: "Puppies"
NavigationPane {
id: navigationPane
Sample //this is one qml page as like Sample.qml
{
}
}}
Tab {
title: "Kittens"
NavigationPane {
id: testpage
Test //this is one qml page as like Test.qml
{
}
}}
您可以通过设置id:,访问其他qml文件:
发布于 2012-11-26 10:08:26
您必须在每个选项卡中声明一个NavigationPane,并将其推入其中:
Tab {
title: "Puppies"
onTriggered: label.text = "kittens"
NavigationPane {
id: navigationPane
}}
https://stackoverflow.com/questions/13561196
复制相似问题