QMetaProperty代表类的属性
用Q_PROPERTY在类中声明属性

在moc会有具体变量名称字符串

函数分析:
QMetaProperty::isEnumType

判断这个属性是否是枚举。
QMetaProperty::enumerator
![]()
获取属性对应的枚举信息,如果不是枚举返回未定义的QMetaEnum
QMetaProperty::isFlagType

属性是否为标识
QMetaProperty::hasNotifySignal
如果此属性具有相应的更改通知信号,则返回true;否则返回false
更改通知信号为上文
![]()
sigAutoStartup是声明的一个信号

![]()
在QMetaObject中绑定了一个回调函数
QMetaProperty::isConstant
属性是否为常量
![]()
下文像Constant、Final、Readable等都是一个枚举值,全名为PropertyFlags::Constant、PropertyFlags:Final:、PropertyFlags::Readable

QMetaProperty::isFinal
是否为最终属性
![]()
QMetaProperty::isReadable
属性是否可读
![]()
QMetaProperty::isRequired
属性是否为必须
![]()
QMetaProperty::isResettable
属性是否可以重置为默认值
![]()
PropertyFlags::Resettable
QMetaProperty::isScriptable
如果属性可为给定对象编写脚本,则返回true

QMetaProperty::isStored
如果属性是为对象存储的,则返回true

QMetaProperty::isUser
是否为用户可编辑属性

QMetaProperty::isValid
属性是否有效
![]()
QMetaProperty::isWritable
属性是否可写
![]()
QMetaProperty::name
读取属性名称字符串
![]()
![]()
QMetaProperty::notifySignal
获取属性变化通知信号函数
![]()
QMetaProperty::notifySignalIndex
返回属性更改通知信号的索引(如果指定了)
![]()
![]()
QMetaProperty::propertyIndex
返回属性索引
![]()

QMetaProperty::read
从给定对象中读取属性的值

QMetaProperty::readOnGadget
和QMetaProperty::read一样,但仅为Q_GADGET属性服务
![]()
QMetaProperty::relativePropertyIndex
返回此属性在封闭元对象中的索引相对值
![]()
QMetaProperty::reset
重置属性

QMetaProperty::resetOnGadget
和QMetaProperty::reset一样,但仅为Q_GADGET属性服务
![]()
QMetaProperty::revision
返回属性的版本
![]()
QMetaProperty::type
返回属性类型
![]()
QMetaProperty::typeName
返回属性类型名称
QMetaProperty::userType
返回属性的类型,枚举QMetaType类型

QMetaProperty::write
将值作为属性的值写入给定的对象

QMetaProperty::writeOnGadget
和QMetaProperty::write一样,但仅为Q_GADGET属性服务
![]()

![[Angular] Import TranslateModule in Angular 16](https://img-blog.csdnimg.cn/4d393fd926b04d22a82760c00891644f.png)




![[Linux]环境变量 进程地址空间(虚拟内存与物理内存的关系)](https://img-blog.csdnimg.cn/6b5e1f0806d74274b96e192d9abc0a78.png)











![[linux]VI编辑器常用命令](https://img-blog.csdnimg.cn/78cb23d3548c4f7088aec996738ed977.png)
