Qml dynamic component creation <SOLVED>
-
Hello all !,
I am having two qml files, main.qml & task.qml. I am launching task.qml on a mouse click from main.qml using Qt.createComponent.
Now I want to pass a signal from Task.qml to main.qml on a mouse click.
and
I want to pass a signal from qt main.cpp to task.qml and vice-versa.
Kindly help me to fix it.Thanks & Regards,
Narayanan K -
Refer this link
http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-interactqmlfromcpp.html
Also look fro Signal Handler Event system of QML
You can emit signal from task.qml. Have the reference of task.qml in main.qml. In main.qml connect the signal with one of your function written in main.qml. You can use the ID of task.qml in main.qml to connect. Rest of the things will work.
-
Thanks a lot.
It worked as I expected.Thanks & Regards,
Narayanan K -
Good to hear that. Also can edit you question put it as <SOLVED> at the top. This helps always.