QMetaClassInfo Class
QMetaClassInfo クラスは、クラスに関する追加情報を提供します。詳細...
ヘッダ | #include <QMetaClassInfo> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
パブリック関数
詳細説明
クラス情報項目は、ソースコード内でQ_CLASSINFO() を使用して指定される、単純な名前と 値のペアです。この情報は、name() やvalue() を使って取得することができます。例えば
class MyClass { Q_OBJECT Q_CLASSINFO("author", "Sabrina Schweinsteiger") Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/") public: ... };
この仕組みは、Qtアプリケーションで自由に使うことができます。
注: これは Active Qt, Qt D-Bus, Qt Qmlや Qt Remote Objectsモジュールでも使用されます。これらのモジュールを使用すると、いくつかのキーが設定されることがあります。
QMetaObjectも参照のこと 。
© 2025 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.