[Interest] QObject::connect returns true, but the connection does not work

Alexander Dyagilev alervdvcw at gmail.com
Wed Feb 22 21:07:10 CET 2017


I googled; ok, it's a QSharedPointer.

https://forum.qt.io/topic/6148/qsharedpointer-userdatatype-as-signal-slot-parameters/5

Works fine now.

I.e:

"I think you need to register them. Make a typedef for 
QSharedPointer<UserDataType>, and use both Q_DECLARE_METATYPE as well as 
qRegisterMetaType() to register it for use."


On 2/22/2017 10:33 PM, Alexander Dyagilev wrote:
> Why?
>
> emit is called; slot is NOT called.
>
> I use QSharedPointer<MyDataType> in slot/signal.
>
> MyDataType is a struct declared as metatype.
>




More information about the Interest mailing list