前言
以前的我只根据功能性选择不同的版本,比如Qt5.6就不再支持webkit,而是变成了webengine。现在的我不得不根据需要适配的手机系统来选择版本。但是这个版本根据什么选择呢?
版本的选择
曾经有个网友告诉我什么都要最新的,xcode、macOS、Qt都要最新的。这个说法不全对,xcode和macos可能需要最新的,这个因为需要适配最新的ios系统,比如现在的ios14。而Qt则需要根据你需要的最低版本的支持来进行选择。
Qt帮助文档中有这样一段话来说明怎么选择版本:
The main concepts involved in expressing support for a particular range of OS versions are:
- Deployment target specifies the hard minimum version of macOS, iOS, tvOS, or watchOS that your application supports.
- SDK version specifies the soft maximum version of macOS, iOS, tvOS, or watchOS that your application supports.
在我理解来,就是Qt决定最低的部署目标(也就是最低版本),可以在帮助文档里搜Supported Platforms看到支持的ios版本。比如我现在用的是Qt5.9.9,如下图,我是为了支持IOS10,将Qt版本将15.5降到5.9.9,这个版本的降级可能会出现一些问题,这个后续讲。