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);

posted on 2025-10-22 18:33  ycfenxi  阅读(1)  评论(0)    收藏  举报