Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

qt get hexa value from qstring

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 by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #qt #hexa #qstring
ADD COMMENT
Topic
Name
1+7 =