passing signal handler defined in one qml file to another top level qml file.
-
How can i pass a signal handler of the signal defined in one qml file to another top level qml file. @dheerendra
-
This question has been asked many times in the forum. Can you look at them ? Signal is sent from one object to another object. You need to have instances of each of the object from QML components. Once you have objects either you can use Connections{} or connect way to pass the data from one object to another object.
-
@dheerendra
I can find this post to solve the issue,https://stackoverflow.com/questions/40407583/how-to-send-a-signal-from-one-qml-to-another
but in my case, i have button.qml, control.qml and multiControl.qml.
My signal
signal buttonsOverlapped()
is defined in button.qml and inside my multiControl.qml i have control element and inside my control.qml i have button element.
I want to use the signal handler
onbuttonsOverlapped:{ }
inside my multiControl.qml file, i tried it placing under control element of this file and also outside of the control element as follows
Button.onButtonsOverlapped: { console.log("hello") }
It is causing to stop the next view to be loaded.
-
Can place simple sample application. We will quickly help you.