On 14 Jul 2014, at 11:11, Rutledge Shawn <shawn.rutle...@digia.com> wrote:
> > On 12 Jul 2014, at 10:03 AM, Martin Koller wrote: > >> Hi, >> >> is there any possibility to use an enum in the Q_ENUMS macro when the enum >> is not >> defined in a QObject derived class ? >> (Specifically I'm trying to do that with QSslError::SslError) > > The Qt namespace has a lot of enums like that. The trick there is to get moc > to pretend that the namespace is actually a class. > > src/corelib/global/qnamespace.h > > (But the fact that it is not a class is perhaps only historical… does anybody > know more?) Hi, Q_GADGET macro allows Q_ENUMS for non-QObject classes, but it would be cool to have a macro (such as Q_NAMESPACE?) that would make the meta object available for plain namespaces. -- J-P Nurmi _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest