我在 Sign.qml 页面中使用了 NavigationPane,用户登录后它将转到 Homescreen.qml 中的 Homescreen.qml 我使用了 TabbedPane,同时单击登录按钮 (Signin.qml) 我得到了响应,但无法转到 Homescreen.qml
在此我附上了我的代码 Signin.qml
NavigationPane {
id: navigationPane
Page {
attachedObjects: ComponentDefinition {
id: pageDefinition
source: "HomeScreen.qml"
}
Container {
Button {
text: "Login"
onClicked: {
//check if is credentials are valid or not
if(isValidUser())
{
var page = pageDefinition.createObject();
navigationPane.push(page);
}
else
{
//show error message
}
}
}
}
}}
和我的 Homescreen.qml 代码
import bb.cascades 1.0
TabbedPane {
id: mainTab
showTabsOnActionBar: true
Tab {
title: "Home"
imageSource: "asset:///menuicons/home.png"
Signin {
id: signin
}
}
Tab {
title: "Home"
imageSource: "asset:///menuicons/home.png"
Editnew {
id: homepage
}
}
Tab {
title: "Messages"
Messages {
}
}
Tab {
title: "Search"
Search{
}
}
Tab {
title: "Feeds"
Feeds {
}
}
Tab {
title: "Nearby"
Nearby{
}
}
Tab {
title: "Followers"
Followers {
id: foll
}
}
Tab {
title: "Group"
Groups {
id: groups
}
}
从登录中单击登录按钮时,我无法查看 Homescreen.qml,谁能给我一些想法如何做到这一点..?