The Qt Quick components are built on top of Qt Quick and provide native-look user interface elements for your QML-based applications. They are bundled together as a module that you can import into your QML file. Once you have imported the components module, you can use the components just as you would use standard QML elements such as Rectangle and Text. As with normal QML applications, you can still use JavaScript and/or Qt C++ for the business logic of your application.
The components are implemented separately for both Symbian and MeeGo 1.2 Harmattan. This has been done so that they can be easily made to match the native look and feel of each platform. In order to keep the implementations compatible, there is a common API definition that each implementation must comply with. This means you can use components based on the common APIs for your application interface and it will work on both platforms.
However, a platform often has ways of doing things that are particular to that platform. During the development of the components, a design decision was made to implement these platform-specific features as extensions to the common APIs or as separate components where appropriate. This keeps the common APIs small and streamlined rather than becoming bloated by all the little bits and pieces special for every platform. So, when developing an application, you can develop the core of your user interface in a cross- platform manner. After you have that done, optimise your the interface to take advantage of features specific to each particular platform. In practice, this means you need to create separate variant files for the parts of your application that use platform-specific features. However, these differences are generally small and, due to the declarative nature of the QML language, it is fast to create these variants.
You can use the Qt Quick components in your QML application with one of the following imports at the top of your QML document:
import com.nokia.meego // MeeGo 1.2 Harmattan components
When using components it is necessary to use Window or PageStackWindow component as a base component for the application. If those are not used some of the features provided by the Qt Quick Components does not work.
There is also a cross-platform import in development but you should consider it as "experimental" for now. Do not be surprised if it does not work how you might expect.
import Qt.labs.components.native 1.0 // Qt Quick components
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.