QString::QString(const char * str)
Constructs a string initialized with the 8-bit string str. The given const char pointer is converted to Unicode using the fromUtf8() function.
C++中u修饰的字符编码对应UTF-16, QString str2("全部");内部实现中将UFT-8转换为UTF-16。所以这个现象取决于编译器和源码实现细节。
QString中有:from*() 和 to*()两类API用来转换编码