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. signal from C++ with QML property
Forum Updated to NodeBB v4.3 + New Features

signal from C++ with QML property

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 221 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    poucz
    wrote on last edited by
    #1

    Hello,

    I have C++ class that have signal to show page in QML StackView.
    Now I need send some property to this page.

    C++ signal:

    void showPage(const QString & url, <????????> );
    

    QML:

        Connections {
               target: global_data
               function onShowPage(url,args) {
                   console.log("Showing page: "+url+" arg: "+args)
                   //pageStack.replace(url, {"name": "testing page"}) old implementation
                    pageStack.replace(url, args) //new implementation
               }
        }
    
    

    Is there any option how to do this?
    Thank you

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Try QVariantMap, QML should understand it.

      (Z(:^

      1 Reply Last reply
      1
      • P Offline
        P Offline
        poucz
        wrote on last edited by
        #3

        Thank you, you are right!!!
        I donť know why, but i tried QQmlProperty....
        QVariantMap didn't think of that

        Tnank you!

        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