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()