I'm trying to convert the following QString
:
QString nom, prenom, promo;
...
QString modelName = nom + "_" + prenom + "_" promo;
into a LPTSTR
.
So far, I've used this:
LPTSTR mm = (LPTSTR) modelName.utf16();
But the LPTSTR
returned contains only the first char of the QString
. I'v tried a lot of methods, including going through a char *
, but nothing worked.
What should I do to get the full QString into the LPTSTR?