UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    qml parse property between pages

    Scheduled Pinned Locked Moved App Development
    5 Posts 4 Posters 879 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • 0 Offline
        007fred50
        last edited by 007fred50

        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 ?

        AppLeeA T 2 Replies Last reply Reply Quote 0
        • AppLeeA Online
          AppLee @007fred50
          last edited by

          @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.

          0 1 Reply Last reply Reply Quote 0
          • 0 Offline
            007fred50 @AppLee
            last edited by

            @AppLee thanks it works now

            1 Reply Last reply Reply Quote 1
            • CiberSheepC Offline
              CiberSheep
              last edited by

              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

              Another planet, another time, another universe!

              1 Reply Last reply Reply Quote 0
              • T Offline
                theBest3000 @007fred50
                last edited by

                @007fred50 Try writing

                import "variables/varis.qml" as Varis
                

                So the first letter is uppercase.

                1 Reply Last reply Reply Quote 0

                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
                • First post
                  Last post