[Interest] QSharedPointer and qRegisterMetaType

Igor Mironchik igor.mironchik at gmail.com
Fri Jan 23 09:47:12 CET 2015


Hi.

How can I register, for example, QSharedPointer< int > in meta type system.

I'm trying to do the following:

typedef QSharedPointer< int > SharedInt;
qRegisterMetaType< SharedInt > ( "Tick" );

but when I'm trying to connect to such signal as Qt::QueuedConnection type  
I receive message:

QObject::connect: Cannot queue arguments of type 'QSharedPointer<int>'
(Make sure 'QSharedPointer<int>' is registered using qRegisterMetaType().)

What am I doing wrong?

Docs says: "Any class or struct that has a public default constructor, a  
public copy constructor and a public destructor can be registered."

All is OK with QSharedPointer< int >. Then what is the problem?

Thanks.

-- 
Best Regards,
Igor Mironchik.



More information about the Interest mailing list