Qt. QString translation to ASCII code

I read about toLocal8Bit (). constData ()...but I didn't get it.

Or tell me how to translate QString to char.

Author: clever clever, 2018-07-08

1 answers

for (int i = 0; i < s.length(); i++) {
  char c = s[i].toLatin1();
  // тут выводим символ с
  QDebug() << (int) c;
}
 0
Author: KoVadim, 2018-07-08 18:01:45