qt get hexa value from qstring

Solutions on MaxInterview for qt get hexa value from qstring by the best coders in the world

showing results for - "qt get hexa value from qstring"
Giorgio
07 Nov 2017
1const QString str = QLatin1String("AA110011");
2bool ok;
3const unsigned int parsedValue = str.toUInt(&ok, 16); //16 because hex is base 16
4if (!ok) {
5    //Parsing failed, handle error here
6}