[Development] QML import versions

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Mon Sep 21 11:48:26 CEST 2015


On Sun, Sep 20, 2015 at 02:59:57PM -0700, Alan Alpert wrote:
> I think last time this was put forward we considered implementing it
> with "metamodules" that are just lists so that we could have a
> qml/Qt5/qmldir that looks like
> 
> <...>
> QtQuick 2.4 since 5.4
> QtQuick 2.5 since 5.5
> QtQuick.Particles 2.0 since 5.0
> <..>
> 
> And that would be a file that the mapping comes from and is parsed by
> the engine when it sees a "QtQuick from Qt 5.5". It would also be
> generic enough so that module bundles other than Qt essentials could
> use it.
> 
a problem with this approach is that this makes apps require a certain
qt version even if all qml imports would be actually satisfied by an
earlier version.
that means that the resolution should ideally happen on the developer's
machine already. optionally, it could document the result:

import QtQuick.Foobar from 5.5
=>
import QtQuick.Foobar 2.4  // from 5.4

of course, one could go even further with that and look for individual
symbols to deduce the lowest required version compatible with the stated
one ...



More information about the Development mailing list