When my application crashes, the Windows Event Viewer always reports my application version as "0.0.0.0".
I can't figure how to set the application version in a way that the Windows Event Viewer recognizes. Changing it with QApplication::setApplicationVersion() http://doc.qt.io/qt-4.8/qcoreapplication.html#applicationVersion-prop doesn't seem to do it.
显然,有比 Windows 崩溃日志更好的方法来调试程序,但除了所有这些之外,我将如何设置这个值以便 Windows 识别它?我的 IDE 是 Qt Creator。
您可以设置VERSION http://doc.qt.io/qt-5/qmake-variable-reference.html#versionqmake 变量在你的pro
file:
VERSION = 1.0.0.0
在 Windows 上,如果 RC_FILE 和
未设置 RES_FILE 变量。生成的 .rc 文件将具有
FILEVERSION 和 ProductVERSION 条目包含主要、次要、补丁
级别和版本号。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)