Thanks for your anwser!
I didn't know I could pass directly a QObject from QML, good to know.
But regarding the second thing, I don't understand... how do those methods help me?
QObject::property() returns the property with the name passed as parameter, while QObject::metaObject() returns a QMetaObject and I'm not sure what to do with it...
I'll tell you a bit what I need to do, maybe it helps. Basically in QML I've got a list with results from searches: the user searches something, and the previous list (if there was) is replaced by a new one with the results.
In my application each view (as in component) gives the possibility to make searches, and every view has to show its own searches at any given time (let's just leave it at that, no need to go into details); so every view has a context that differs from the others in order to show different things in every view.
When the user searches something, I need to get the context of the view in which the search started, in order to change the model of the list of results so that it only changes in that given view, not in others.
So basically when the user searches, I need to set a property containing the new model of the list so that is accessible from the QML view that prompted the search. This way, since the list uses the model obtained from C++, whenever the property is redefined from C++ it will change in QML too. I don't know if I made myself clear...
From what I've seen, the QMetaObject that QObject::metaObject() doesn't let me define a new property (or redefine an old one) so that it would be accessible from QML, or maybe I'm missing something...