Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Passing values and url from cpp to qml

Passing values and url from cpp to qml

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.3k 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.
  • BharathiB Offline
    BharathiB Offline
    Bharathi
    wrote on last edited by
    #1

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

    BharathiB 1 Reply Last reply
    0
    • K Offline
      K Offline
      karti gesar
      wrote on last edited by
      #2

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

      see this

      1 Reply Last reply
      0
      • BharathiB Bharathi

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

        BharathiB Offline
        BharathiB Offline
        Bharathi
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0
          • BharathiB Offline
            BharathiB Offline
            Bharathi
            wrote on last edited by
            #5

            @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
            0
            • BharathiB Offline
              BharathiB Offline
              Bharathi
              wrote on last edited by
              #6

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

              1 Reply Last reply
              2

              • Login

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