1.在头文件( .h )中插入:
#pragma execution_character_set("utf-8")
2.在源文件( .cpp )中设置中文:
QString ss = "好啊!";
//ss.toUtf8(),在任意想输入中文的地方设置即可!
ss = ss.toUtf8();
this->setCaptionBarElementText(ss, 2);
//===================或者======================
this->setCaptionBarElementText(ss.toUtf8(), 2);