QMetaClassInfo Class
Die Klasse „QMetaClassInfo“ liefert zusätzliche Informationen zu einer Klasse. Mehr dazu...
| Header: | #include <QMetaClassInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
Öffentliche Funktionen
Ausführliche Beschreibung
Klasseninformationen sind einfacheName-Wert-Paare, die im Quellcode mit ` Q_CLASSINFO()` angegeben werden. Die Informationen können mit ` name()` und ` value()` abgerufen werden. Beispiel:
class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
public:
//...
};Dieser Mechanismus steht Ihnen in Ihren Qt-Anwendungen zur freien Verfügung.
Hinweis: Er wird auch von der Active Qt, Qt D-Bus, Qt Qmlund Qt Remote Objects Modulen verwendet. Bei der Verwendung dieser Module werden möglicherweise einige Schlüssel gesetzt.
Siehe auch QMetaObject.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.