PythonQt.QtCore.QMetaObject · declarations 001
Back to PythonQt.QtCore.QMetaObject
checkConnectArgs
checkConnectArgs(signal: Any, method: Any) -> bool
X.checkConnectArgs(signal, method) -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QMetaObject::checkConnectArgs(const char *signal, const char *method)
Returns true if the signal and method arguments are compatible; otherwise returns
false.
Both signal and method are expected to be normalized.
See also normalizedSignature().
[static] bool QMetaObject::checkConnectArgs(const QMetaMethod \&signal, const QMetaMethod \&method)
This is an overloaded function.
Returns true if the signal and method arguments are compatible; otherwise returns
false.
This function was introduced in Qt 5.0.
Upstream PySide2 reference signatures (binding differences may apply):
checkConnectArgs(signal: PySide2.QtCore.QMetaMethod, method: PySide2.QtCore.QMetaMethod) -> bool
checkConnectArgs(signal: str, method: str) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#checkConnectArgs
classInfo
classInfo(index: int) -> Any
X.classInfo(index) -> PythonQt.QtCore.QMetaClassInfo
Supplemental documentation: Qt 5 reference:
QMetaClassInfo QMetaObject::classInfo(int index) const
Returns the meta-data for the item of class information with the given index.
Example:
class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
public:
...
};
See also classInfoCount(), classInfoOffset(), and indexOfClassInfo().
Upstream PySide2 reference signatures (binding differences may apply):
classInfo(self, index: int) -> PySide2.QtCore.QMetaClassInfo
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#classInfo
classInfoCount
classInfoCount() -> int
X.classInfoCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::classInfoCount() const
Returns the number of items of class information in this class.
See also classInfo(), classInfoOffset(), and indexOfClassInfo().
Upstream PySide2 reference signatures (binding differences may apply):
classInfoCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#classInfoCount
classInfoOffset
classInfoOffset() -> int
X.classInfoOffset() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::classInfoOffset() const
Returns the class information offset for this class; i.e. the index position of this class's first class information item.
If the class has no superclasses with class information, the offset is 0; otherwise the offset is the sum of all the class information items in the class's superclasses.
See also classInfo(), classInfoCount(), and indexOfClassInfo().
Upstream PySide2 reference signatures (binding differences may apply):
classInfoOffset(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#classInfoOffset
className
className(*args: Any, **kwargs: Any) -> str
Return the classname of the object
Supplemental documentation: Qt 5 reference:
const char *QMetaObject::className() const
Returns the class name.
See also superClass().
Upstream PySide2 reference signatures (binding differences may apply):
className(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#className
constructor
constructor(index: int) -> Any
X.constructor(index) -> PythonQt.QtCore.QMetaMethod
Supplemental documentation: Qt 5 reference:
QMetaMethod QMetaObject::constructor(int index) const
Returns the meta-data for the constructor with the given index.
This function was introduced in Qt 4.5.
See also constructorCount() and newInstance().
Upstream PySide2 reference signatures (binding differences may apply):
constructor(self, index: int) -> PySide2.QtCore.QMetaMethod
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#constructor
constructorCount
constructorCount() -> int
X.constructorCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::constructorCount() const
Returns the number of constructors in this class.
This function was introduced in Qt 4.5.
See also constructor() and indexOfConstructor().
Upstream PySide2 reference signatures (binding differences may apply):
constructorCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#constructorCount
enumerator
enumerator(index: int) -> Any
X.enumerator(index) -> PythonQt.QtCore.QMetaEnum
Supplemental documentation: Qt 5 reference:
QMetaEnum QMetaObject::enumerator(int index) const
Returns the meta-data for the enumerator with the given index.
See also enumeratorCount(), enumeratorOffset(), and indexOfEnumerator().
Upstream PySide2 reference signatures (binding differences may apply):
enumerator(self, index: int) -> PySide2.QtCore.QMetaEnum
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#enumerator
enumeratorCount
enumeratorCount() -> int
X.enumeratorCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::enumeratorCount() const
Returns the number of enumerators in this class.
See also enumerator(), enumeratorOffset(), and indexOfEnumerator().
Upstream PySide2 reference signatures (binding differences may apply):
enumeratorCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#enumeratorCount
enumeratorOffset
enumeratorOffset() -> int
X.enumeratorOffset() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::enumeratorOffset() const
Returns the enumerator offset for this class; i.e. the index position of this class's first enumerator.
If the class has no superclasses with enumerators, the offset is 0; otherwise the offset is the sum of all the enumerators in the class's superclasses.
See also enumerator(), enumeratorCount(), and indexOfEnumerator().
Upstream PySide2 reference signatures (binding differences may apply):
enumeratorOffset(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#enumeratorOffset
getClassName
getClassName() -> int
X.getClassName() -> int
indexOfClassInfo
indexOfClassInfo(name: str) -> int
X.indexOfClassInfo(name) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfClassInfo(const char *name) const
Finds class information item name and returns its index; otherwise returns -1.
See also classInfo(), classInfoCount(), and classInfoOffset().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfClassInfo(self, name: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfClassInfo
indexOfConstructor
indexOfConstructor(constructor: str) -> int
X.indexOfConstructor(constructor) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfConstructor(const char *constructor) const
Finds constructor and returns its index; otherwise returns -1.
Note that the constructor has to be in normalized form, as returned by normalizedSignature().
This function was introduced in Qt 4.5.
See also constructor(), constructorCount(), and normalizedSignature().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfConstructor(self, constructor: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfConstructor
indexOfEnumerator
indexOfEnumerator(name: str) -> int
X.indexOfEnumerator(name) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfEnumerator(const char *name) const
Finds enumerator name and returns its index; otherwise returns -1.
See also enumerator(), enumeratorCount(), and enumeratorOffset().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfEnumerator(self, name: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfEnumerator
indexOfMethod
indexOfMethod(method: str) -> int
X.indexOfMethod(method) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfMethod(const char *method) const
Finds method and returns its index; otherwise returns -1.
Note that the method has to be in normalized form, as returned by normalizedSignature().
See also method(), methodCount(), methodOffset(), and normalizedSignature().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfMethod(self, method: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfMethod
indexOfProperty
indexOfProperty(name: str) -> int
X.indexOfProperty(name) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfProperty(const char *name) const
Finds property name and returns its index; otherwise returns -1.
See also property(), propertyCount(), and propertyOffset().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfProperty(self, name: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfProperty
indexOfSignal
indexOfSignal(signal: str) -> int
X.indexOfSignal(signal) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfSignal(const char *signal) const
Finds signal and returns its index; otherwise returns -1.
This is the same as indexOfMethod(), except that it will return -1 if the method exists but isn't a signal.
Note that the signal has to be in normalized form, as returned by normalizedSignature().
See also indexOfMethod(), normalizedSignature(), method(), methodCount(), and methodOffset().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfSignal(self, signal: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfSignal
indexOfSlot
indexOfSlot(slot: str) -> int
X.indexOfSlot(slot) -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::indexOfSlot(const char *slot) const
Finds slot and returns its index; otherwise returns -1.
This is the same as indexOfMethod(), except that it will return -1 if the method exists but isn't a slot.
See also indexOfMethod(), method(), methodCount(), and methodOffset().
Upstream PySide2 reference signatures (binding differences may apply):
indexOfSlot(self, slot: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#indexOfSlot
inherits
inherits(*args: Any, **kwargs: Any) -> bool
Returns if the class inherits or is of given type name
Supplemental documentation: Qt 5 reference:
bool QMetaObject::inherits(const QMetaObject *metaObject) const
Returns true if the class described by this
QMetaObject inherits the type
described by metaObject; otherwise returns false.
A type is considered to inherit itself.
This function was introduced in Qt 5.7.
Upstream PySide2 reference signatures (binding differences may apply):
inherits(self, metaObject: PySide2.QtCore.QMetaObject) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#inherits
method
method(index: int) -> Any
X.method(index) -> PythonQt.QtCore.QMetaMethod
Supplemental documentation: Qt 5 reference:
QMetaMethod QMetaObject::method(int index) const
Returns the meta-data for the method with the given index.
See also methodCount(), methodOffset(), and indexOfMethod().
Upstream PySide2 reference signatures (binding differences may apply):
method(self, index: int) -> PySide2.QtCore.QMetaMethod
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#method
methodCount
methodCount() -> int
X.methodCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::methodCount() const
Returns the number of methods in this class, including the number of methods provided by each base class. These include signals and slots as well as normal member functions.
Use code like the following to obtain a QStringList containing the methods specific to a given class:
const QMetaObject* metaObject = obj->metaObject();
QStringList methods;
for(int i = metaObject->methodOffset(); i < metaObject->methodCount(); ++i)
methods << QString::fromLatin1(metaObject->method(i).methodSignature());
See also method(), methodOffset(), and indexOfMethod().
Upstream PySide2 reference signatures (binding differences may apply):
methodCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#methodCount
methodOffset
methodOffset() -> int
X.methodOffset() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::methodOffset() const
Returns the method offset for this class; i.e. the index position of this class's first member function.
The offset is the sum of all the methods in the class's superclasses (which is always positive since QObject has the deleteLater() slot and a destroyed() signal).
See also method(), methodCount(), and indexOfMethod().
Upstream PySide2 reference signatures (binding differences may apply):
methodOffset(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#methodOffset
normalizedSignature
normalizedSignature(method: str) -> Any
X.normalizedSignature(method) -> PythonQt.QtCore.QByteArray
Supplemental documentation: Qt 5 reference:
[static] QByteArray QMetaObject::normalizedSignature(const char *method)
Normalizes the signature of the given method.
Qt uses normalized signatures to decide whether two given signals and slots are compatible. Normalization reduces whitespace to a minimum, moves 'const' to the front where appropriate, removes 'const' from value types and replaces const references with values.
See also checkConnectArgs() and normalizedType().
Upstream PySide2 reference signatures (binding differences may apply):
normalizedSignature(method: str) -> PySide2.QtCore.QByteArray
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#normalizedSignature
normalizedType
normalizedType(type: str) -> Any
X.normalizedType(type) -> PythonQt.QtCore.QByteArray
Supplemental documentation: Qt 5 reference:
[static] QByteArray QMetaObject::normalizedType(const char *type)
Normalizes a type.
See QMetaObject::normalizedSignature() for a description on how Qt normalizes.
Example:
QByteArray normType = QMetaObject::normalizedType(" int const *");
// normType is now "const int*"
This function was introduced in Qt 4.2.
See also normalizedSignature().
Upstream PySide2 reference signatures (binding differences may apply):
normalizedType(type: str) -> PySide2.QtCore.QByteArray
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#normalizedType
property
property(index: int) -> Any
X.property(index) -> PythonQt.QtCore.QMetaProperty
Supplemental documentation: Qt 5 reference:
QMetaProperty QMetaObject::property(int index) const
Returns the meta-data for the property with the given index. If no such property exists, a null QMetaProperty is returned.
See also propertyCount(), propertyOffset(), and indexOfProperty().
Upstream PySide2 reference signatures (binding differences may apply):
property(self, index: int) -> PySide2.QtCore.QMetaProperty
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#property
propertyCount
propertyCount() -> int
X.propertyCount() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::propertyCount() const
Returns the number of properties in this class, including the number of properties provided by each base class.
Use code like the following to obtain a QStringList containing the properties specific to a given class:
const QMetaObject* metaObject = obj->metaObject();
QStringList properties;
for(int i = metaObject->propertyOffset(); i < metaObject->propertyCount(); ++i)
properties << QString::fromLatin1(metaObject->property(i).name());
See also property(), propertyOffset(), and indexOfProperty().
Upstream PySide2 reference signatures (binding differences may apply):
propertyCount(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#propertyCount
propertyOffset
propertyOffset() -> int
X.propertyOffset() -> int
Supplemental documentation: Qt 5 reference:
int QMetaObject::propertyOffset() const
Returns the property offset for this class; i.e. the index position of this class's first property.
The offset is the sum of all the properties in the class's superclasses (which is always positive since QObject has the name() property).
See also property(), propertyCount(), and indexOfProperty().
Upstream PySide2 reference signatures (binding differences may apply):
propertyOffset(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#propertyOffset
superClass
superClass() -> Any
X.superClass() -> PythonQt.QtCore.QMetaObject
Supplemental documentation: Qt 5 reference:
const QMetaObject *QMetaObject::superClass() const
Returns the meta-object of the superclass, or nullptr if there is no such object.
See also className().
Upstream PySide2 reference signatures (binding differences may apply):
superClass(self) -> PySide2.QtCore.QMetaObject
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#superClass
userProperty
userProperty() -> Any
X.userProperty() -> PythonQt.QtCore.QMetaProperty
Supplemental documentation: Qt 5 reference:
QMetaProperty QMetaObject::userProperty() const
Returns the property that has the USER flag set to true.
This function was introduced in Qt 4.2.
See also QMetaProperty::isUser().
Upstream PySide2 reference signatures (binding differences may apply):
userProperty(self) -> PySide2.QtCore.QMetaProperty
Source: https://doc.qt.io/archives/qt-5.15/qmetaobject.html#userProperty