How to convert QString to ASCII ?
Solved
General and Desktop
-
@sonichy
see QChar::toLatin1() which returns achar
which also can be cast to anint
to get the QChar, use QString::at() -
@raven-worx said in How to convert QString to ASCII ?:
cast to an int
QString a = ...; QString b = ...; ushort as = a.at(0).unicode(); ushort bs = b.at(0).unicode(); qDebug() << a << as << b << bs; if(as != bs-1) return false;