0
点赞
收藏
分享

微信扫一扫

Qt QObject::connect: Cannot queue arguments of type ‘***’


Qt QObject::connect: Cannot queue arguments of type ‘***’_linux

Qt QObject::connect: Cannot queue arguments of type ‘***’

文章目录

  • ​​Qt QObject::connect: Cannot queue arguments of type ‘***’​​
  • ​​摘要​​
  • ​​1 问题描述​​
  • ​​2 解决方法​​


关键字:

​arguments ​​、

​QObject​​、

​registered ​​、

​qRegisterMetaType​​、

​Qt​

内容背景:

最近项目终于切到Linux下开发了,所以最近的记录都是发生在​​Debian 10​​​ 以及​​Arm Debain 10​​​ 下,​​Qt​​​版本​​5.12.3​​。这几天真是问题多多,收获满满,不过目前阶段仅仅停留在解决问题,至于原理性的东西,还得慢慢消化。最近好多问题都是直接群里问大神,感谢各位大神助我成长。

摘要

额,这个问题在win的没有太注意有没有这个问题,但是切刀Linux下,看到,那就解决了他。

1 问题描述

在我这里实际报错内容如下

QObject::connect: Cannot queue arguments of type ‘QSerialPort::SerialPortError’

(Make sure ‘QSerialPort::SerialPortError’ is registered using qRegisterMetaType().)

Qt QObject::connect: Cannot queue arguments of type ‘***’_linux_02

2 解决方法

这个其实就一句话,那就是在函数调用前注册了就可以,代码如下

qRegisterMetaType<QSerialPort::SerialPortError>("Turing_Serial_DataAnalysis");

举报

相关推荐

0 条评论