[Qt-interest] Treating User defined type as QVariant via void*
Thiago Macieira
thiago at kde.org
Wed Sep 22 14:41:35 CEST 2010
Em Quarta-feira 22 Setembro 2010, às 13:09:01, Santhosh Y escreveu:
> On 9/22/2010 4:16 PM, Stephen Kelly wrote:
> > You never use the macro Q_DECLARE_METATYPE
> >
> > Have a read through the docs for QVariant and QMetaType.
> >
> >
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> 1>------ Rebuild All started: Project: variant_test, Configuration:
> Debug Win32 ------
> 1>Deleting intermediate and output files for project 'variant_test',
> configuration 'Debug|Win32'
> 1>Compiling...
> 1>variant.cpp
> 1>.\variant.cpp(37) : warning C4100: 'n' : unreferenced formal parameter
> 1>c:\qt\4.5.2\include\qtcore\../../src/corelib/kernel/qmetatype.h(189) :
> error C2039: 'qt_metatype_id' : is not a member of 'QMetaTypeId<T>'
> 1> with
> 1> [
> 1> T=Node *
> 1> ]
Your code has:
Q_DECLARE_METATYPE (Node)
You have to add:
Q_DECLARE_METATYPE (Node*)
Please read and understand my other email about the use of pointers.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Qt Developer Days 2010 - Munich Oct 11-13 - San Francisco Nov 1-3
For more information and to register: http://qt.nokia.com/qtdevdays2010
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100922/806e80f0/attachment.bin
More information about the Qt-interest-old
mailing list