Qt创建者中的串行通信

时间:2015-02-23 06:04:16

标签: qt serial-port serial-communication

我遇到了下面描述的以下错误,如何纠正此类错误以及为什么会生成此错误?

  

QIODEVICE ::写:设备未打开

(com端口在设备管理器中也不可见)

这是某种系统错误吗?

1 个答案:

答案 0 :(得分:0)

如果你只使用Qt,请使用QSerialPort。 但你可以使用windows api,createfile(),readfile(),writefile() 走: http://support.microsoft.com/KB/115831 或者这篇文章: Open a COM port in C++ with number higher that 9