QMetaClassInfo Class
La classe QMetaClassInfo fornisce ulteriori informazioni su una classe. Per saperne di più...
| Intestazione: | #include <QMetaClassInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
Funzioni pubbliche
Descrizione dettagliata
Le voci informative della classe sono semplici coppienome-valore specificate utilizzando Q_CLASSINFO() nel codice sorgente. Le informazioni possono essere recuperate utilizzando name() e value(). Ad esempio:
class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
public:
//...
};Questo meccanismo è liberamente utilizzabile nelle applicazioni Qt.
Nota: viene utilizzato anche dal Active Qt, Qt D-Bus, Qt Qmle Qt Remote Objects . Alcuni tasti potrebbero essere impostati quando si utilizzano questi moduli.
Vedi anche 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.