How to Convert QString to Wide C String (wchar_t *)

Posted on Posted in Qt Tutorials, Tutorials

The same as standard C String, for this also you can go through standard C++ as shown below:

Let’s say you have a QString, like this:

QString s = “”;

First convert it to std::wstring and then use its c_str method, like this:


Leave a Reply

Your email address will not be published. Required fields are marked *