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. How to pass a signal into a Loader?

How to pass a signal into a Loader?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 301 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.
  • Q Offline
    Q Offline
    QTLeearn
    wrote on last edited by
    #1

    Hi, I would like to pass a signal into a Loader in order to let the item in the loader to listen to that signal.
    For example:

    //item.qml
    //.........
    onSignal: changeProperty(true);
    //.........
    
    //mian.qml
    //..........
    Loader
    {
       id: loaderID
       source: "item.qml"
    }
    onClicked: signal();  //How to pass this signal into item.qml?
    
    

    P.S. I might not use C++ signal, Thank you in advance!

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      If you want emit signal of current item in loader you can try this: loaderID.item.signal().

      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