[Interest] Q_GADGET and Q_MOVABLE_TYPE

Lorenz Haas lykurg at gmail.com
Fri Aug 21 12:00:58 CEST 2015


Hi,

suppose we have a class Foo:

class Foo {
public:
  enum Bar {/*...*/};
};
Q_DECLARE_TYPEINFO(Foo, Q_MOVABLE_TYPE);

Now, because of Qt 5.5 and the new shiny Q_ENUM we want nice debug
messages for Foo's enumeration values. Thus we extend Foo:

class Foo {
Q_GADGET
public:
  enum Bar {/*...*/};
  Q_ENUM(Bar)
};
Q_DECLARE_TYPEINFO(Foo, Q_MOVABLE_TYPE);

Is it still a movable type. I am lost in the sources and all the
QMetaEnum, QMetaClassInfo etc.

Thanks
Lorenz



More information about the Interest mailing list