如何找到所有 QML 模块的最新版本 [英] How to find the latest versions of all QML modules
问题描述
通常我的 QML 文件以 import QtQuick 2.4
和其他导入开头.如何知道导入模块的最新版本,而无需通过类型和构建来猜测?
你基本上不必知道.通过导入特定版本,您只需声明您不需要任何可能更新的版本的附加功能.这并不意味着如果有可用的更新版本,您就不会使用它——这只是意味着,如果仅存在一个旧版本,您的代码将拒绝运行./p> 因此,如果您碰巧使用了较新版本的功能(成员、类等),您应该只更改导入的模块版本.就这样.您将确切地知道您需要什么版本,因为您正在使用您在文档中阅读的功能.该文档将说明它适用于哪个模块版本. 您正在使用的 Qt 中给定 Qt Quick 模块的文档将说明这一点 - 无需发布说明. Usually my QML files start with You basically don't have to know. By importing a particular version, you merely declare that you don't need the additional functionality of any potentially newer version. That doesn't mean that you won't use a newer version if one is available - it simply means that your code will refuse to run if only an older version than the one you need is present. So, you should only change the imported module version if you happen to use the functionality (members, classes, etc.) from a newer version. That's all. And you will know exactly what version you need, since you're using the functionality you read about in the documentation. The documentation will state what module version it applies to. The documentation for a given Qt Quick module from the Qt that you're using will state this - no need for release notes. 这篇关于如何找到所有 QML 模块的最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!import QtQuick 2.4
and other imports. How can I know which is the latest version of the imported modules without having to guess by type and build?