PDA

View Full Version : StackView get index or views page



KeineAhnung
18th November 2014, 20:18
Hi,

I am trying to port an App form Sailfish to Android. Since Android does not provide push and pull menus I need to store my settings somewhere else. My plan was to use StackView with a tool bar. Within the toolbar I have a settings button that opens a context menu. This works but it always displays the menu from the main.qml. How can I adjust the menu so that I have a view specific menu?
My plan was to somehow get the view "name" and adjust the main menu accordingly. But so far I was not able to figure out to get the view "name".

wysota
18th November 2014, 21:26
Could you provide an example of what you mean?

KeineAhnung
18th November 2014, 22:03
I think I got it. After endless searching on Google I tried Bind and there I found my answer right away. Here (http://qt-project.org/forums/viewthread/44644) someone asked the same thing.

It took me some time to figure out the right syntax for the push argument.

myStackView.push({item:Qt.resolveURL("URL"), properties:{objectName:"name"}})