#include <QtCore/QCoreApplication>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QString qstr = QObject::tr("Hello Qt!");
string str = qstr.toStdString();
cout << str;
return a.exec();
}
是不是很爽?
Enjoy it!