Qmake: how to check for Qmake version

て烟熏妆下的殇ゞ 提交于 2019-12-14 02:37:06

问题


I want to write some Qmake project files which are both compatible with Qmake 4 and Qmake 5.

There are subtle differences where I need to check if I it uses Qmake 4. How can I do such a check?


回答1:


You can check Qt version in pro file:

equals(QT_MAJOR_VERSION, 4): # do something for Qmake 4
equals(QT_MAJOR_VERSION, 5): # do something for Qmake 5


来源:https://stackoverflow.com/questions/26948091/qmake-how-to-check-for-qmake-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!