Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Displaying one qml fro another using Loader
QtWS25 Last Chance

Displaying one qml fro another using Loader

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 5 Posters 2.0k Views
  • 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.
  • V Offline
    V Offline
    vishu_fcb
    wrote on last edited by
    #1

    How do i display a new QML page form an existing screen using Loader or states and transition command ? anyone please help

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Just refer the Qt Documentation Loader. It has nice example. You can look below.

      import QtQuick 2.0

      Item {
      width: 200; height: 200

        Loader { id: pageLoader }
      
        MouseArea {
            anchors.fill: parent
            onClicked: pageLoader.source = "Page1.qml"
        }
      

      }

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      4
      • W Offline
        W Offline
        walter-j
        wrote on last edited by
        #3

        Hello Friends,

        I have the same problem. I have tried this code but it does not work.

        Can someone help me please?

        Thank you

        Josephat

        Josephat Kabitshwa

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Did u try the example given by me in the post ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • W Offline
            W Offline
            walter-j
            wrote on last edited by
            #5

            yes but it didn't work for me.

            Thanks

            Josephat

            Josephat Kabitshwa

            1 Reply Last reply
            0
            • W Offline
              W Offline
              walter-j
              wrote on last edited by
              #6

              /home/walter-j/Pictures/Screenshot from 2017-05-17 18-53-20.png

              Josephat Kabitshwa

              W 1 Reply Last reply
              0
              • W walter-j

                /home/walter-j/Pictures/Screenshot from 2017-05-17 18-53-20.png

                W Offline
                W Offline
                walter-j
                wrote on last edited by
                #7

                0_1495043835571_Screenshot from 2017-05-17 18-53-20.png

                Josephat Kabitshwa

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #8

                  The image-upload feature on our forum is broken, you might see the picture but other users don't. Please upload your image to a image hoster of your choice (e.g. postimage.org) and embed the pic here with the following markup: ![alternate text](image-url). See also How to insert image on this forum and Hitchhiker's Visual Guide to the Qt Forum.

                  1 Reply Last reply
                  1
                  • mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #9

                    I could see it :) First time ever. Wonder ho w long it lasts. anywayre , here is copy
                    alt text

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      walter-j
                      wrote on last edited by
                      #10

                      Sorry

                      It does not work.

                      Thanks

                      Josephat

                      Josephat Kabitshwa

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        walter-j
                        wrote on last edited by
                        #11

                        i see the problem it can load the page but not unload the preceding page.

                        dou you have an idea how to unload the first page please?

                        Thank you

                        Josephat

                        Josephat Kabitshwa

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved