13 Star 122 Fork 40

张小飞 / QtDocumentCN

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
QMetaClassInfo.md 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
ZgblKylin 提交于 2020-07-26 22:11 . 更新译者注

QMetaClassInfo 类

QMetaClassInfo 类提供了某个类的附加信息。更多内容...

属性 内容
头文件 #include <QMetaClassInfo>
qmake: QT += core

Public Functions

返回类型 函数
const char * name() const
const char * value() const

详细描述

类型信息对象指的在源代码中通过 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 不会在自身的任何类中使用它。

另请参阅:QMetaObject

成员函数文档

const char *QMetaClassInfo::name() const

返回本信息对象的名称。

另请参阅:value()。


const char *QMetaClassInfo::value() const

返回本信息对象的值。

See also name()。

C++
1
https://gitee.com/cryfeifei/QtDocumentCN.git
git@gitee.com:cryfeifei/QtDocumentCN.git
cryfeifei
QtDocumentCN
QtDocumentCN
master

搜索帮助