I'm trying to send a custom c++ object from a QThread to a slot in the main thread using the standard Qt signal/slot mechanism. I'm registering my custom type using qRegisterMetaType() and it all works well... please see this gist for a short code snippet:
The problem is, when I add an std::unique_ptr<> member to my custom class, my object is no longer copy-constructible, and qRegisterMetaType() fails. If I use a plain old pointer it works just fine.
My question is:
Is there any way to send objects that are moveable (i.e have C++11 move semantics) but are NOT copyable via the Qt signal/slot mechanism?