Pay attention:
::toUtf8() returns a QBytearray. After your complete call, the constData() is
invalid.
You must copy the pointer before the QBytearray gets out of scope.
Am July 21, 2020 4:58:54 PM UTC schrieb Doogster <[email protected]>:
>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()
>_______________________________________________
>Interest mailing list
>[email protected]
>https://lists.qt-project.org/listinfo/interest
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest