美文网首页
Type is not registered, please u

Type is not registered, please u

作者: _compass | 来源:发表于2020-09-24 17:51 被阅读0次

今天在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(你的自定义数据类名)

即可。

相关文章

网友评论

      本文标题:Type is not registered, please u

      本文链接:https://www.haomeiwen.com/subject/ryltuktx.html