[Qt-interest] qRegisterMetaType and namespaces
Andre Somers
andre at familiesomers.nl
Fri Sep 4 14:34:15 CEST 2009
Girish Ramakrishnan wrote:
> Andre Somers wrote:
>
>> Girish Ramakrishnan wrote:
>>
>>> Hi Andre,
>>> Have you tried
>>> qRegisterMetaType<SelectionPolicyFlags>("SelectionPolicyFlags"); ?
>>>
>>>
>>>
>> Thanks, Girish! I had not tried that variation before, and it works :-)
>> Great.
>>
>> Next up: figuring out where and how to use the Q_FLAGS macro to make the
>> meta property system work with this flag...
>>
>>
>
> Welcome to namespace/metatype hell :)
>
:S
Documentation in this section is not optimal. It is spread out, and not
very clear. In this case:
Flags and the Meta-Object System
The Q_DECLARE_FLAGS <qflags.html#Q_DECLARE_FLAGS>() macro does not
expose the flags to the meta-object system, so they cannot be used by Qt
Script or edited in Qt Designer. To make the flags available for these
purposes, the Q_FLAGS <qobject.html#Q_FLAGS>() macro must be used:
Q_FLAGS(Options)
"Must be used"? Where? How? In a header, or in the implementation? Does
this expand to anything, or is it supposed to be trigger moc somehow?
And, more importantly in my case, not a word about stuff like namespaces.
Anybody any suggestions for the right incantation that I need to chant?
André
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090904/839888b3/attachment.html
More information about the Qt-interest-old
mailing list