Reputation: 121
I have used a TabbedPane in this while clicking i need to call an another qml file here is the code am using but its not working
TabbedPane {
showTabsOnActionBar: tabs
sidebarState: SidebarState.VisibleCompact
Tab {
imageSource: "asset:///msg.png"
Page {
id: page1
actions: [
ActionItem {
onTriggered: {
var page = pageDefinition.createObject();
navigationPane.push(page);
}
attachedObjects: ComponentDefinition {
id: pageDefinition;
source: "x.qml"
}
}
]
actionBarVisibility: ChromeVisibility.Visible
}
}
can anyone send me code how to add Click event inside this function Thanks
Upvotes: 0
Views: 360
Reputation: 513
Here is an example for creating tabs for a different screen. You are in main tab to go next qml as follows:
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
{
}
}
}
You can access other QML files by setting the id.
Upvotes: 2