I have a thread which makes a huge object
and I want to pass it using qt signal back to main thread.
Can I pass the shared_ptr (c++11) reffering to that object,
and how?
I have a thread which makes a huge object
and I want to pass it using qt signal back to main thread.
Can I pass the shared_ptr (c++11) reffering to that object,
and how?
You need to declare the specialized shared pointer type with Q_DECLARE_METATYPE and call qRegisterMetaType() somewhen before using the signal.
http://doc.qt.io/qt-5/qmetatype.html#Q_DECLARE_METATYPE
Cheers,
_
Bookmarks