qml parse property between pages
-
Hej
How can i Parse proberty between pages? in QML (PageStack)
property string vUser: "fredy"I trry to (import "variables/varis.qml" as varis) but then i get this error here:
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/1.3/PageStack.qml:231:9: QML PageWrapper: (file:///home/fredy/Desktop/ubuntutouch/login2/build/all/app/install/qml/home.qml:6:33: Invalid import qualifier ID import "variables/varis.qml" as varis ^)Can you help me ?
-
@007fred50
You don't have to import anything.The property of the parent object is herited, so you can use it directly.
You are limited in depth IIRC, but it's easy for a child to redefine the property at its level.
-
@AppLee thanks it works now
-
If you have the property defined in the page, you can add a value to it as:
https://gitlab.com/cibersheep/gelek-vanilla/-/blob/master/qml/Main.qml#L169
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login