0

can anyone help me in converting a QString into unicode from Ascii and vice versa

If possible add some code snippet.

Thanks,

Sharath
  • 315
  • 1
  • 3
  • 13
  • I am trying ...QByteArray qbyte(key.toUtf8(), key.size());QTextCodec coder=QTextCodec::toUnicode(qbyte); where key is QString, but i am gettings error like with in the scope – Sharath Oct 21 '13 at 08:17

1 Answers1

0

QString provides the toUtf8() function that returns a const char * version of the string as QByteArray. QString also provides fromUtf8().

B.T.W. The Qt technical pages provide plenty of examples.

fredvanl
  • 193
  • 1
  • 9