1. quint16 oldUpper = 0xC8; 以16进制、大写的形式打印出来:
方法1:
qDebug() << "oldUpper (hex):" << QString::number(oldUpper, 16).toUpper();
方法2:
qDebug()<< "oldUpper:"<< Qt::hex<
2. 16进制转为double型
quint32 hexValue = 0xFE1A3C;
// 转换为double进行数学运算
double value = static_cast(hexValue);
浙公网安备 33010602011771号