[Qt-qml] Changes to how QML files can import other QML files?

Jan Ekholm jan.ekholm at smultron.net
Thu Jul 22 16:46:40 CEST 2010


On Thursday 22 July 2010 17:24:04 Kai Koehne wrote:

> There was an e-mail some time ago that this 'feature' (which is just a
> bug) has been fixed. The warning message tells you exactly what the
> problem is: import "X" is for importing a directory, not an individual
> file.
> 
> You can just remove the offending import statements, they're of no use:
> All files in the same directory can be used directly.

Aha, that does make things better. Thanks for the tip, Kai! For .js files the 
old syntax is however still in use, as I have things like:

import "MapUtils.js" as MapUtils

that does not trigger any warnings and the code works.

-- 

   Sometimes it's better to light a flamethrower than curse the darkness.
                                            -- Terry Pratchett, Men at Arms



More information about the Qt-qml mailing list