I know what version of Qt I'm shipping my app with. And I suppose a single version of Qt contains only a single version of each QML module. So if I were to write:
import QtQuick
(no version specified), that would be unambiguous. So why is it necessary to specify the module version?
It is, so everyone can see, which version is demanded.
It might be that you ship your code, using features of QtQuick 2.7, someone
tries to open it with an older version (say: QtQuick 2.5) and strangely - it's broken.
If you import a specific version, it is clear, that the error stems from an too old version.
I think it is the best to always try to use the least version. So unless you use features of QtQuick 2.7, declare the older ones, to maximize compatibility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With