Hi..
I would like to know if there is a methode in Qt that converts a QString to char* ??
thanks
Hi..
I would like to know if there is a methode in Qt that converts a QString to char* ??
thanks
qPrintable()
Qt Code:
QString convertString; const char *errorMessage = converString.toAscii().constData(); char *errorMessage = convertString.toAscii().data();To copy to clipboard, switch view to plain text mode
QString convertString;
QByteArray ba = converString.toLatin1();
char *errorMessage = ba.data();
Never use direct conversion : converString.toLatin1().data()
Bookmarks