[Qt-interest] qRegisterMetaType and namespaces
Andre Somers
andre at familiesomers.nl
Thu Sep 3 17:28:19 CEST 2009
Nobody?
----- Oorspronkelijk bericht -----
Van: Andre Somers <andre at familiesomers.nl>
Verzonden: woensdag 2 september 2009 11:20
Aan: Qt-interest <qt-interest at trolltech.com>
Onderwerp: [Qt-interest] qRegisterMetaType and namespaces
Hi,
I must be missing some simple...
I am working on a set of classes that have been wrapped in a namespace.
Contained within this namespace is an enum type, that is then used with
Q_DECLARE_FLAGS to create a nice set of flags. I am thus ending up with
a SelectionPolicyFlags type.
One of the classes has Q_PROPERTY defined of that type. I know that in
order to make this work, I need to call Q_DECLARE_METATYPE for this
type, outside the namespace itself. That works. However, I also need to
call qRegisterMetaType<SelectionPolicyFlags>() for them to be usefull in
the Qt property system (and in queued signal/slots). It is there I am
running in to a problem. While the registering itself seems to work (I
have inserted a debug statement that outputs the type id that is
assigned), actually using it in the property does not. When trying to
[Het originele bericht is niet volledig opgenomen]
More information about the Qt-interest-old
mailing list