[Qt-qml] QML Quick examples : "Charts 1.0 module" : how this works?
bea.lam at nokia.com
bea.lam at nokia.com
Wed Sep 22 02:09:25 CEST 2010
Hi Matthieu,
On 21/09/2010, at 9:36 PM, ext Matthieu.Rioteau at skf.com wrote:
> Hi all,
>
> I have a big interest in QML but am facing an issue where I can't
> understand what to do.
> I downloaded the latest Qt Creator snapshots and started looking at the
> Quick examples.
> In the one named "tutorials" -> "extending", all QML files contains a line
> : "import Charts 1.0" that leads to a compilation error : " module Charts
> is not installed ".
>
> But I can't solve that.
> Is this module a package that will be included later ?
> Or (regarding the title of the tutorial), is the module a C++ 'plugin'
> that I have to compile myself ? In this case, could somebody help finding
Yes, the examples in these tutorials have to be compiled and run as C++ applications. The QML files in these directories cannot be run standalone from the QML Viewer (which is the default behaviour for QML projects in Qt Creator). The exception to this is the Chapter 6 example, which contains a C++ plugin that has to be compiled before the QML file can be loaded from the QML Viewer.
This particular "extending" tutorial is thoroughly documented in the QML docs - see http://doc.qt.nokia.com/4.7-snapshot/qml-extending-tutorial-index.html. You might find this helpful for understanding the use of plugins and modules in the tutorial.
regards,
Bea
More information about the Qt-qml
mailing list