【发布时间】:2018-08-28 03:33:33
【问题描述】:
所以我需要通过 UART 发送一个十六进制的命令。 我试图直接分配给 QByteArray 但没有成功
QByteArray test = 0x21, 0x30, 0xFF... //the result is that test is empty.
我确实尝试通过 QString 进行分配
QString t = 0x21, 0x30, 0xFF...
file->write(t.toLatin1()) //also without success.
有谁知道如何解决这个问题?感谢您的关注。
【问题讨论】:
标签: c++ qt qfile qbytearray