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

Alexander Dyagilev alervdvcw at gmail.com
Wed Feb 22 21:08:52 CET 2017


I think it would be a good idea to mention about this in the 
QSharedPointer docs....


On 2/22/2017 11:07 PM, Alexander Dyagilev wrote:
> 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