QString str = "FFFFFFF5"; bool t; qDebug() << str.toInt(&t, 16) << t;
0 false
qDebug() << QString::number(-11, 16);
"fffffffffffffff5"
bool t; unsigned int tmp = str.toUInt(&t, 16); int result; memcpy(&result, &tmp, sizeof(tmp)); qDebug() << result << t;
C++ (Qt)const QString str = "FFFFFFF5";bool t = false;const int result = str.toUInt(&t, 16); qDebug() << result << t;
QByteArray arr("\xF5\xFF\xFF\xFF", 4); int result; memcpy(&result, arr.constData(), sizeof(result)); qDebug() << result;
float result = static_cast<const float>(str.toUInt(&t, 16));
C++ (Qt)bool ok;QString str("-F5");int i = str.toInt(&ok, 16);
C++ (Qt)unsigned int a1 = 0xFFFFFFF5;int a2 = -11;bool eq = (a1 == a2);qDebug() << a1 << a2 << eq;