增加运行环境变量
This commit is contained in:
parent
63ab540c26
commit
73b255ae96
@ -110,12 +110,12 @@ SET(PROJECT_SOURCES
|
|||||||
${src}
|
${src}
|
||||||
)
|
)
|
||||||
# 设置消息策略为qFatal来禁用qDebug信息
|
# 设置消息策略为qFatal来禁用qDebug信息
|
||||||
#LIST(APPEND CMAKE_CXX_FLAGS "-DQT_NO_DEBUG_OUTPUT")
|
LIST(APPEND CMAKE_CXX_FLAGS "-DQT_NO_DEBUG_OUTPUT")
|
||||||
|
|
||||||
#资源文件
|
#资源文件
|
||||||
QT6_ADD_RESOURCES(RCFILES res.qrc)
|
QT6_ADD_RESOURCES(RCFILES res.qrc)
|
||||||
#WIN32
|
#WIN32
|
||||||
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${RCFILES} xsteam.rc)
|
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES} ${RCFILES} xsteam.rc)
|
||||||
|
|
||||||
#安全编译
|
#安全编译
|
||||||
#关闭RPATH特性
|
#关闭RPATH特性
|
||||||
|
2
main.cpp
2
main.cpp
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
qputenv("QT_QPA_PLATFORM","windows:fontengine=freetype");
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
QTranslator qtBaseTranslator;
|
QTranslator qtBaseTranslator;
|
||||||
if (!qtBaseTranslator.load(QStringLiteral(":/res/translator/qtbase_zh_CN.qm")))
|
if (!qtBaseTranslator.load(QStringLiteral(":/res/translator/qtbase_zh_CN.qm")))
|
||||||
|
Loading…
Reference in New Issue
Block a user