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 : public QObject
{
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 。
© 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.