16,212
社区成员
发帖
与我相关
我的任务
分享
#include <QApplication>
#include <QDialog>
#include <QLabel>
#include <QTextCodec>
int main (int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QDialog w;
QLabel label (&w);
label.setText (QObject::tr("Hello Qt! 你好,Qt!"));
w.show();
return a.exec();
}