Hi,

While I'm not aware of the versions being well documented, the 
autocomplete in QtCreator seems to offer all the available versions, so 
you can check that. The idea originally was that the versions should 
reflect the Qt module version, but IIRC this is not strictly true, as 
the version will not be bumped if the API is not actually different.

The import versioning system as done by Qt is a sort of API handshake - 
it doesn't actually select between different implementations, you just 
select feature-sets. Thus, you should always import the latest (for 
better or worse). Unfortunately, Qt has no wildcard import syntax (or 
for "latest").

The good news is your 2.0 statement will import whatever the latest 
implementation registers for the 2.0 version. The ((un)intended?) 
side-effect of this is that the backward compatibility is not 100% - if 
you relied on something that has changes/fixes in the newer 
implementation, there is no going back other than downgrading your Qt 
version.

If you're not bundling your Qt libs (like on Linux desktops), it gets a 
bit worse as there is no elegant fallback versioning mechanism, so you 
need to do either dynamic loaders or maintain parallel versions of your 
QML files.

Best regards,
Attila

On 11/26/2014 10:04 AM, Harri Pasanen wrote:
> QML module versions is somewhat fuzzy area for me, so I'm
> looking for some advice.
>
> Some of my files start with a barrage of imports, like
>
> import QtQuick 2.3
>
> That becomes lots of versions to keep track of.
>
> I'm not sure if I do
>
> import QtQuick 2.0
>
> will I import some bugs that would be fixed if I had done
>
> import QtQuick 2.3
>
> How is it?
>
> Also the new file wizard seems to add older version imports, not the latest.
>
> For simplicity, I'd like to track the latest version of all the modules.
> Is that info centralized somewhere?
>

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to