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. calling another qml file from main qml file
QtWS25 Last Chance

calling another qml file from main qml file

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlqt quickcall
6 Posts 2 Posters 2.7k 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.
  • Q Offline
    Q Offline
    Qjay
    wrote on 27 May 2016, 13:13 last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • L Offline
      L Offline
      literA2
      wrote on 27 May 2016, 13:21 last edited by
      #2

      @Qjay have you tried using Loader? You can set it's source to view or load another qml file and set it to blank ("") to unload it.

      Q 1 Reply Last reply 27 May 2016, 14:04
      0
      • L literA2
        27 May 2016, 13:21

        @Qjay have you tried using Loader? You can set it's source to view or load another qml file and set it to blank ("") to unload it.

        Q Offline
        Q Offline
        Qjay
        wrote on 27 May 2016, 14:04 last edited by
        #3

        @literA2 Thanks it worked ( earlier i did tried Loader but i was doing it wrong )

        here is how it worked :

         Loader{
                    id : webview
                }
        
                onClicked: {
                    onClicked: webview.source = "Mywebview.qml"
        
                }
            }
        
        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qjay
          wrote on 27 May 2016, 14:17 last edited by
          #4

          Is it possible to keep on calling that qml file . Currently when i click on show page it only shows it once . If i close it , it does not show that webview again

          L 1 Reply Last reply 30 May 2016, 11:22
          0
          • Q Qjay
            27 May 2016, 14:17

            Is it possible to keep on calling that qml file . Currently when i click on show page it only shows it once . If i close it , it does not show that webview again

            L Offline
            L Offline
            literA2
            wrote on 30 May 2016, 11:22 last edited by
            #5

            @Qjay yes, have you tried clearing it's source or setting it to blank once you closed the webview?

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              Qjay
              wrote on 30 May 2016, 15:58 last edited by
              #6

              yes , i have tried it but if i set it to blank suddenly the webview closes . I am not sure where should i place that code .

              1 Reply Last reply
              0

              4/6

              27 May 2016, 14:17

              • Login

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