Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to pass a signal into a Loader?



  • 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!



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


Log in to reply