[Qt-interest] getting inside the moc
Luca Ferrari
fluca1978 at infinito.it
Wed May 13 15:15:22 CEST 2009
Ops...I've messed up pointers...sorry, it works.
Luca
On Wednesday 13 May 2009 12:39:55 pm Luca Ferrari's cat walking on the
keyboard wrote:
> I'm trying to "spy" what moc and qt do, but I'm having a doubt. In the moc
> generated file I've got that the QMetaObject struct is initialized as
> follows:
>
> const QMetaObject Signal::staticMetaObject = {
> { &QObject::staticMetaObject, qt_meta_stringdata_Signal,
> qt_meta_data_Signal, 0 }
> };
>
> having qt_meta_stringdata_Signal being:
>
> static const char qt_meta_stringdata_Signal[] = {
> "Signal\0\0emittingValue\0integerSignal(int)\0"
> "voidSignal()\0emittingFloatValue\0"
> "floatSignal(float)\0"
> };
>
> However, if I try to do the following:
>
> const QMetaObject* metaObject = this->metaObject();
> const char* stringdata = metaObject->d.stringdata;
>
> the stringdata I'm getting is null. On the other hand, the same applied to
> the d.data works fine. Why?
>
> Thanks,
> Luca
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list