StackView attached properties not visible in pushed objects
I have a StackView which includes
In the root Item in file.qml, I can do
But in the root Item of another.qml, a reference to Stack.view gives the error:
ReferenceError: Stack is not defined
Shouldn't the StackView's attached properties be visible in any QML file loaded by the StackView?
Hmm, have you tried to use parent instead of Stack like:
[quote author="dasRicardo" date="1412850595"]parent.view.push[/quote]
You can't do parent.view.push, but you can do parent.push. But that's not very convenient if you're not in the root Item.
I've found that the id: of the StackView is visible in its children, so if its id: is stackView, you can do stackView.push() anywhere in the child.