Qt Get Hexa Value From Qstring

[Solved] Qt Get Hexa Value From Qstring | Cpp - Code Explorer | yomemimo.com
Question : qt get hexa value from qstring

Answered by : doriath-arthus

const QString str = QLatin1String("AA110011");
bool ok;
const unsigned int parsedValue = str.toUInt(&ok, 16); //16 because hex is base 16
if (!ok) { //Parsing failed, handle error here
}

Source : https://stackoverflow.com/a/17654235/14875923 | Last Update : Tue, 21 Sep 21

Answers related to qt get hexa value from qstring

Code Explorer Popular Question For Cpp