QMetaEnum Class

The QMetaEnum class provides meta-data about an enumerator. More...

Header: #include <QMetaEnum>
qmake: QT += core

Detailed Description

Use name() for the enumerator's name. The enumerator's keys (names of each enumerated item) are returned by key(); use keyCount() to find the number of keys. isFlag() returns whether the enumerator is meant to be used as a flag, meaning that its values can be combined using the OR operator.

The conversion functions keyToValue(), valueToKey(), keysToValue(), and valueToKeys() allow conversion between the integer representation of an enumeration or set value and its literal representation. The scope() function returns the class scope this enumerator was declared in.

See also QMetaObject, QMetaMethod, and QMetaProperty.