用了
qDebug() << qPrintable(QDateTime::currentDateTime().toString("HH:mm:ss:zzz")) << qPrintable(“>>”) << "[" << qPrintable(QString("%1").arg(content.length(), 3, 10, QChar('0'))) << ']' << qPrintable(content.toHex(' '));
输出结果
15:41:23:227 >> [ 008 ] 01 03 00 00 00 01 84 0a
问题就是[ 008 ],这个中间是有两个空格的,从哪出来的?
qDebug() << qPrintable(QDateTime::currentDateTime().toString("HH:mm:ss:zzz")) << qPrintable(“>>”) << "[" << qPrintable(QString("%1").arg(content.length(), 3, 10, QChar('0'))) << ']' << qPrintable(content.toHex(' '));
输出结果
15:41:23:227 >> [ 008 ] 01 03 00 00 00 01 84 0a
问题就是[ 008 ],这个中间是有两个空格的,从哪出来的?
![](http://hiphotos.baidu.com/ninth_month/pic/item/5023821e013619971ad57617.jpg?v=tbs)