PythonQt.QtCore.QMetaEnum · declarations 001
Back to PythonQt.QtCore.QMetaEnum
isFlag
isFlag() -> bool
X.isFlag() -> bool
Supplemental documentation: Qt 5 reference:
bool QMetaEnum::isFlag() const
Returns true if this enumerator is used as a flag; otherwise returns false.
When used as flags, enumerators can be combined using the OR operator.
See also keysToValue() and valueToKeys().
Upstream PySide2 reference signatures (binding differences may apply):
isFlag(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#isFlag
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QMetaEnum::isValid() const
Returns true if this enum is valid (has a name); otherwise returns false.
See also name().
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#isValid
key
key(index: int) -> str
X.key(index) -> int
Supplemental documentation: Qt 5 reference:
const char *QMetaEnum::key(int index) const
Returns the key with the given index, or nullptr if no such key exists.
See also keyCount(), value(), and valueToKey().
Upstream PySide2 reference signatures (binding differences may apply):
key(self, index: int) -> str
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#key
keyCount
keyCount() -> int
X.keyCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaEnum::keyCount() const
Returns the number of keys.
See also key().
Upstream PySide2 reference signatures (binding differences may apply):
keyCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#keyCount
keyToValue
keyToValue(key: str, ok: Any) -> int
X.keyToValue(key, ok) -> int
Supplemental documentation: Qt 5 reference:
int QMetaEnum::keyToValue(const char *key, bool *ok \= nullptr) const
Returns the integer value of the given enumeration key, or -1 if key is not defined.
If key is not defined, *ok is set to false; otherwise *ok is set to true.
For flag types, use keysToValue().
See also valueToKey(), isFlag(), and keysToValue().
Upstream PySide2 reference signatures (binding differences may apply):
keyToValue(self, key: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#keyToValue
keysToValue
keysToValue(keys: str, ok: Any) -> int
X.keysToValue(keys, ok) -> int
Supplemental documentation: Qt 5 reference:
int QMetaEnum::keysToValue(const char *keys, bool *ok \= nullptr) const
Returns the value derived from combining together the values of the keys using the OR operator, or -1 if keys is not defined. Note that the strings in keys must be '|'-separated.
If keys is not defined, *ok is set to false; otherwise *ok is set to true.
See also isFlag(), valueToKey(), and valueToKeys().
Upstream PySide2 reference signatures (binding differences may apply):
keysToValue(self, keys: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#keysToValue
name
name() -> str
X.name() -> int
Supplemental documentation: Qt 5 reference:
const char *QMetaEnum::name() const
Returns the name of the type (without the scope).
For example, the Qt::Key
enumeration has Key as the type name and
Qt as the scope.
For flags this returns the name of the flag type, not the name of the enum type.
See also isValid(), scope(), and enumName().
Upstream PySide2 reference signatures (binding differences may apply):
name(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#name
scope
scope() -> str
X.scope() -> int
Supplemental documentation: Qt 5 reference:
const char *QMetaEnum::scope() const
Returns the scope this enumerator was declared in.
For example, the
Qt::AlignmentFlag
enumeration has Qt as the scope and AlignmentFlag as the name.
See also name().
Upstream PySide2 reference signatures (binding differences may apply):
scope(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#scope
value
value(index: int) -> int
X.value(index) -> int
Supplemental documentation: Qt 5 reference:
int QMetaEnum::value(int index) const
Returns the value with the given index; or returns -1 if there is no such value.
See also keyCount(), key(), and keyToValue().
Upstream PySide2 reference signatures (binding differences may apply):
value(self, index: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#value
valueToKey
valueToKey(value: int) -> str
X.valueToKey(value) -> int
Supplemental documentation: Qt 5 reference:
const char *QMetaEnum::valueToKey(int value) const
Returns the string that is used as the name of the given enumeration value, or
nullptr if value is not defined.
For flag types, use valueToKeys().
See also isFlag() and valueToKeys().
Upstream PySide2 reference signatures (binding differences may apply):
valueToKey(self, value: int) -> str
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#valueToKey
valueToKeys
valueToKeys(value: int) -> Any
X.valueToKeys(value) -> PythonQt.QtCore.QByteArray
Supplemental documentation: Qt 5 reference:
QByteArray QMetaEnum::valueToKeys(int value) const
Returns a byte array of '|'-separated keys that represents the given value.
See also isFlag(), valueToKey(), and keysToValue().
Upstream PySide2 reference signatures (binding differences may apply):
valueToKeys(self, value: int) -> PySide2.QtCore.QByteArray
Source: https://doc.qt.io/archives/qt-5.15/qmetaenum.html#valueToKeys