I found this (useless in my case) question: How to convert QString to LPCSTR (Unicode) which most of you probably would consider duplicate, but I think it's either related to different Qt / VS / C++ version or just has no correct answers (despite some is marked so).
I have this code using Qt5 in Visual Studio 2013 on Windows 7, using C++11 standards, it uses all of the proposed solutions in linked answer:
QString test = "hello world";
// 1
LPCSTR lp1 = _T(test.toLocal8Bit().constData());
// 2
LPCSTR lp2 = _T(test.toUtf8().toStdString().c_str());
// 3
LPCSTR lp3 = _T(test.toLatin1().toStdString().c_str());
Produces
îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþç'Û)ÆS2¹ú¨ºú
Produces
îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþFþš
Produces
îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþFþš
How do I convert it?