Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to use QString object in string operations.??
aekam last edited by
I want to use QString in string operations like say strCpy (char *dest, const char *source).
i have a normal array @string1@ as destination and QString string2 as source.
It gives me error, that QString can't be converted to char *, even though i used string2.constData().
[[moved from Qt Quick forum, Tobias]]
Might be that const data is too const for the compiler here :) Make a copy of it, or use QString::toUtf8().data().
Or just use QStrings only, they are powerful.
guziemic last edited by
Try to convert to Utf8 and then take pointer to char