well, it can be used through the proxy object that I suggested. You can use QMetaObject::invokeMethod on the slot you define there. That slot can then use a normal method invocation on the object you pass for the actual property setting. The invokeMethod should use the Qt::QueuedConnection connection type.
The proxy object could be quite simple, I guess something like this would suffice:
@
class PropertySetProxy: public QObject
{
Q_OBJECT
public:
PropertySetProxy(QObject* parent = 0): QObject(parent) {}
setProperty(const QObject* target, const char* property, QVariant value);
};
//implementation
PropertySetProxy::setProperty(const QObject* target, const char* property, QVariant value)
{
//check if target object lives in the same thread as we do
if (thread() != target->thread()) {
qWarning() << "Can't set property of object living in different thread!";
return;
}
target->setProperty(property, value);
}
@
Note: brain to forum editor, code is not tested and to be understood as an example only.