1、需要一个 *.rc 文件,用以保存相关信息。比如添加一个 app.rc 里面内容如下所示:
IDI_ICON1 ICON DISCARDABLE "app.ico" -----> 设置应用程序图标
#include "winver.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2014,8,7,1
PRODUCTVERSION 1,0,0,0
FILEFLAGS 0x0L
FILEFLAGSMASK 0x3fL
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "CompanyName", "jsqdws"
VALUE "FileDescription", ""
VALUE "FileVersion", "1.0.0.0"
VALUE "LegalCopyright", "Copyright (C) 2009-2011 Hermes Microvision Inc"
VALUE "InternalName", ""
VALUE "OriginalFilename", "frAlarmServer"
VALUE "ProductName", ""
VALUE "ProductVersion", "1.0.0.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END
2、在 .pro文件里添加rc文件配置
RC_FILE = app.rc
3、执行qmake
4、执行构建
5、查看exe,即可看到所设置的信息
手机扫一扫
移动阅读更方便
你可能感兴趣的文章