On terça-feira, 22 de janeiro de 2013 18.51.15, Shady Zayat wrote:
> Is there a way to access the QMetaObject for a non QObject subclass that
> has the Q_GADGET macro, in runtime, by class name or by type id? I'm
> looking for something similar to
>  const QMetaObject * QMetaType::metaObjectForType(int type)

There's no central registration of QMetaObjects in Qt.

If you want that, you need to create the registration yourself in your own
application or library.

> What I'm trying to write here is a generic function that returns the string
> value of Q_ENUMS stored in a QVariant. Any hints appreciated.

And you're trying to do this generically? You should restrict it to the
classes you know about, so you can find their meta objects.
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to