Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Passing values and url from cpp to qml

    General and Desktop
    3
    6
    1060
    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.
    • Bharathi
      Bharathi last edited by

      How to pass the values and url from cpp to qml?

      Bharathi 1 Reply Last reply Reply Quote 0
      • K
        karti gesar last edited by

        http://doc.qt.io/qt-5/qtqml-cppintegration-data.html

        see this

        1 Reply Last reply Reply Quote 0
        • Bharathi
          Bharathi @Bharathi last edited by

          @karti-gesar I did'nt need data conversion.I need to pass the values or url to qml

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            You can use the technique described here.

            If it doesn't suite your needs, then you'll have to give more details about your use case.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • Bharathi
              Bharathi last edited by

              @main.qml
              MediaPlayer
              {
              id:mediaplayer
              source:"C:/Users/bharathiraja/Desktop/video.mp4";
              autoPlay:true
              loops:Animation.Infinite
              }
              VideoOutput
              {
              width:512
              height:538

                      id: videooutput
                      source: mediaplayer
                  }
              

              @
              I want to pass the url path of the video from cpp file.

              1 Reply Last reply Reply Quote 0
              • Bharathi
                Bharathi last edited by

                I get it through context property..
                Thanks for the reply..

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post