On Tuesday, 21 July 2020 09:58:54 PDT Doogster wrote:
> 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()

^^^^

Just remember that it's a temporary. The pointer will be freed at the ;

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to