我的配置
目前尝试
// QTextCodec *codec = QTextCodec::codecForName("UTF-8");//中文
// QTextCodec::setCodecForLocale(codec);
这种方式不怎么行还是乱码
只有使用一下的方式才行,包括注释掉的也可以,
QLabel *title = new QLabel(this);
// title->setText(QStringLiteral("速度"));
QString sTitle = QString::fromLocal8Bit("速度");
title->setText(sTitle);
qDebug()<<"1111"<<sTitle;
title->show();