How do I set my application version for Windows in

2019-07-14 09:07发布

When my application crashes, the Windows Event Viewer always reports my application version as "0.0.0.0". Windows Event Viewer version I can't figure how to set the application version in a way that the Windows Event Viewer recognizes. Changing it with QApplication::setApplicationVersion() doesn't seem to do it.

Obviously there are better ways to debug a program than the Windows Crash Log, but in lieu of all of that, how would I go about setting this value so that Windows recognizes it? My IDE is Qt Creator.

标签: c++ qt qt4
1条回答
不美不萌又怎样
2楼-- · 2019-07-14 09:52

You can set the VERSION qmake variable in your pro file:

VERSION = 1.0.0.0

On Windows, triggers auto-generation of an .rc file if the RC_FILE and RES_FILE variables are not set. The generated .rc file will have the FILEVERSION and PRODUCTVERSION entries filled with major, minor, patch level, and build number.

查看更多
登录 后发表回答