Quote Originally Posted by vcp View Post
Qt Code:
  1. ucTest = (unsigned char *) str.toLatin1().data();
To copy to clipboard, switch view to plain text mode 
Nope, that is not correct.

QString::data() doesn't return what you think it returns.
Use this instead:

Qt Code:
  1. ucTest = (unsigned char *) str.toAscii().data();
To copy to clipboard, switch view to plain text mode