引用第5楼dbzhang800于2011-05-03 17:11发表的 Re:回 1楼(dbzhang800) 的帖子 :
这涉及另一个基本概念(相对路径),和前者(环境变量)无关
http://blog.csdn.net/dbzhang800/archive/2011/04/26/6363165.aspx
1.请问应该怎么设置相对路径?
2.我的每次生成的.pro文件中TARGET = 后面都是空的,请问这样是否正常?
我的main函数是:
#include <QApplication>
#include <QPushButton>
#include <QTranslator>
int main (int argc, char *argv [])
{
QApplication app (argc, argv);
QTranslator translator;
translator.load ("tr/hellotr_la");
app.installTranslator (&translator);
QPushButton hello (QPushButton::tr ("Hello world!"));
hello.resize (100, 30);
hello.show ();
return app.exec ();
}
.pro文件内容是:
######################################################################
# Automatically generated by qmake (2.01a) ??? ?? 3 17:31:32 2011
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += . tr
INCLUDEPATH += .
# Input
SOURCES += main.cpp
TRANSLATIONS +=tr/hellotr_la.ts