[Interest] Converting QStrings to const char *

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Tue Jul 21 19:16:57 CEST 2020


Am 21.07.2020 um 18:58 schrieb Doogster:
> My program uses both Qt and a C API that takes, as parameters, UTF-8
> const char * strings.
>
> Is this the correct way to convert a QString containing a UTF8 string
> to that format?
>
> qString.toUtf8().constData()
Wasn't this question already answered?
https://forum.qt.io/topic/117165/how-to-use-std-strcpy


Christian


More information about the Interest mailing list