Let there be a C++ class which contains signals and some functions accessible from QML. Now, in order to access the members of that class in QML, I write something like:
myClass
{
id: abc
x: 100
onXChanged: {console.log ("xx");}
}
Assuming x is a member of the actual C++ class, the above code does work.
Now, I have an object of the C++ class i.e. myClass created in a relevant C++ file.
Question:
Instead of creating a new object of the same class in QML, is it possible and sensible to access and use the already created C++ object in QML?