I\'m trying to simplify (i.e. get rid of loads of boilerplate code) the creation of QObject
wrapper classes that forward property access of other QObject<
The vagaries of moc
aside, your wrapper is not thread-safe. The property getter is not invoked from the correct thread. So I don't see any point of the wrapper. You might as well use the wrapped class directly from QML, not the wrapper.
To be thread-safe, your wrapper should be caching the wrapped property's value, so that the reads always happen from the local copy.
At that point you might as well write a fully dynamic wrapper that thread-safely forwards all properties from the wrapped object. Using the metaobject system you can generate everything on the fly - the copies of the property values, etc. As far as properties go, you can copy the entire binary descriptor as your wrapper pretends to have the same properties.