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.
  • B Offline
    B Offline
    Bharathi
    wrote on 10 Jun 2016, 07:08 last edited by
    #1

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

    B 1 Reply Last reply 10 Jun 2016, 07:13
    0
    • K Offline
      K Offline
      karti gesar
      wrote on 10 Jun 2016, 07:10 last edited by
      #2

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

      see this

      1 Reply Last reply
      0
      • B Bharathi
        10 Jun 2016, 07:08

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

        B Offline
        B Offline
        Bharathi
        wrote on 10 Jun 2016, 07:13 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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 10 Jun 2016, 22:17 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
          • B Offline
            B Offline
            Bharathi
            wrote on 13 Jun 2016, 04:05 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
            • B Offline
              B Offline
              Bharathi
              wrote on 13 Jun 2016, 09:05 last edited by
              #6

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

              1 Reply Last reply
              2

              2/6

              10 Jun 2016, 07:10

              topic:navigator.unread, 4
              • Login

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