Thank you Wysota, the problem I was having was experimenting with other possibilities and I did not back that code out before attempting the qmlRegisterType.
I have noticed that QML behaves differently when these objects are passed to the script as a signal. I have added to the previous code example that reproduces this.
The update adds a singleShot QTimer that passed the object1 twice to the script. Once declared class and the second as a QObject.
When passed as a class it is casted as a QVariant and I will not have access to any properties or slots.
When passed as a QObject I will have access to properties but is also casted differently then when it is passed using the doSomething() function. (Clickign anywhere in the window)
I could not find anyway to cast it from a QVariant in the script so I could access it properly. Also a little confused why it is casting the same object type differently.
Bookmarks