QString to char* without converting
-
wrote on 21 Nov 2016, 09:11 last edited by
Hey. How to convert a QString to char *, in other words how to get to the data without conversion data? Get the data as they are.
-
wrote on 21 Nov 2016, 09:26 last edited by m.sue
Hi,
as long as the internal structure does not change you can use the function utf16() for that. This is what you can call the win32 API *W functions with directly.
If you want to stay within Qt you can use the data() function that returns a QChar* pointer which essentially is also a wrapper for an UTF16 character.
-Michael.
1/2