The different behavior of Connections QML type
jiancaiyang last edited by
I found QML type
Connectionsis different. Why we call it different is that Connections can accept arbitrary signal handlers and notify handlers as you wish. If you want to put an non-existent handler into other QML type specification, the QML engine will not to execute and print an error:
qrc:/main.qml:18 Cannot assign to non-existent property "onSomethingHappened"
I want to make use of this particular feature and make my own QML type like
Connections, so I take a deep research on it. How could I achieve that?
It uses an internal class :
You can read more about it in this KDAB blogpost : https://www.kdab.com/qml-engine-internals-part-4-custom-parsers/