示例代码如下:
QByteArray arr;
arr.append(0x01);
arr.append(0x02);
arr.append(0x03);
arr.append(0x04);
qDebug() << arr.toHex(' ').toUpper();
输出效果:
示例代码如下:
QByteArray arr;
arr.append(0x01);
arr.append(0x02);
arr.append(0x03);
arr.append(0x04);
qDebug() << arr.toHex(' ').toUpper();
输出效果: