今天在Qt里使用树控件的时候,绑定自定义节点取数据会报以下错误:
Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system
用以下方法解决:
Q_DECLARE_METATYPE(你的自定义数据类名)
即可。
今天在Qt里使用树控件的时候,绑定自定义节点取数据会报以下错误:
Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system
用以下方法解决:
Q_DECLARE_METATYPE(你的自定义数据类名)
即可。