Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

why QMetaObject::invokeMethod() still construct object when reference is used as input parameter?

$
0
0
I have the following call in worker thread to invoke function call A in main thread. I notice QMetaMethod::invoke() calls QMetaType::construct(), and this function will call class B constructor. And later once it’s done, destructor is called in main thread. Why is it even input parameter is reference?  QMetaObject::invokeMethod(this, "A", Qt::QueuedConnection,             Q_ARG(const B &, b));

Viewing all articles
Browse latest Browse all 18427

Trending Articles