windows + qt Chinese garbled

Solution:

Found in the installation path Qt bin directory, search include folders, find qglobal.h header file, adding the following code:

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

Note that the file should be saved as utf-8! !

Guess you like

Origin www.cnblogs.com/dianrain/p/11109186.html