11-05-2012 08:00 AM
I have my preferences in a separate Sheet with its own NavigationPane.
(as the application menu should not be available there)
I would like to have the same "back" action as a normal page though.
When i define a back action in actions i get it placed in the middle of the action bar, which is not looking good.
How can i get it to look like the default "back"?
Solved! Go to Solution.
11-05-2012 11:34 AM
11-05-2012 01:26 PM
Just like Peter said, I don't think what you are trying to do is possible unless you push to a new page then disable the menu on that new page. What I've done to get around that and still use Sheet (from a UX standpoint) is have a "close" action rather than a "back" action. In my scenario I have an "X" for an image rather than a "<"
11-06-2012 01:08 AM - edited 11-06-2012 01:13 AM
Hi Simon,
dismiss ActionItem inside TitleBar is what you're looking for.
Here I'm providing you a sample :
Sheet{
Page{
signal done()
titleBar: TitleBar {
dismissAction: ActionItem {
title: "Back"
onTriggered: {
done()
}
}
}
Container{
}
}
}
Best Regards,
Megha Patel
11-06-2012 07:28 AM
11-07-2012 07:29 AM
11-07-2012 07:51 AM
11-07-2012 08:52 AM
I have added this code in my NavigationPane:
onTopChanged: {
console.debug("top changed to id: "+page.id);
}
but get only this:
Debug: top changed to id: undefined
How do i identify the top page correctly?
11-07-2012 09:02 AM
There may be more than one way, but this is working for me in a case where I'm dynamically creating the secondary Page on which I want the menu disabled:
// in main.qml
NavigationPane {
id: root
property variant chart_page
...
onSomeEvent: {
if (!chart_page)
chart_page = chartDefinition.createObject();
root.push(chart_page);
}
...
onTopChanged: {
Application.menuEnabled = Boolean(page != chart_page);
// note: Boolean() not really necessary, just here to
// make the code clearer
}
}
11-07-2012 09:06 AM