This tutorial explains the basics of developing Qt Quick applications with the help of code walkthroughs of complete applications. The tutorial extends the standard Qt Quick documentation provided with Qt and relies on it as a source of more detailed information about Qt Quick APIs and fundamental concepts.
This tutorial is thought to precede in-depth content as a prerequisite for those of you who are new to Qt Quick. Even though it starts with the basics, you still have to be familiar with principles of programming. Some basic knowledge of JavaScript is highly recommended.
After completing this tutorial, you should be able to write your own Qt Quick applications and start discovering more by reading advanced materials or analyzing the code of complex applications.
This tutorial starts with the traditional “Hello World” application and ends with a full-featured Qt Quick application that can be used on a daily basis. The features of this final application covers the major Qt Quick programming aspects.
Features are never enough
No doubt many more features could have been added, but it had to be finished at a certain level to keep the size of this tutorial in limits. Feel free to take the source code of the final application and extend it. You will know how to do it!
The tutorial is a journey through these aspects. We will stop at famous places, watch some remarkable scenery, and use the gained knowledge to enhance the application more and more. At each of those steps we will look into code samples, and discuss what is happening there and how we use it in our application. At the end, you might be surprised that the application is fairly simple compared to the length of the tutorial. This is on purpose: our target is not to develop the application quickly, but to learn through the journey.
Right after “Hello World”, we’re going to develop a simple application that shows the current time and date in the nostalgic format of an old LED clock. The next step is another application which reads, parses, and displays weather forecasts from the Internet. Later, we try to combine these two applications as components into a larger application: a clock with integrated weather forecasting.
Note that some advanced aspects are not discussed in this tutorial to keep it simple. Those aspects are mentioned in the last chapter. One piece of advice that we have for you is to remember the old developer saying: “Documentation is your friend” [http://qt-project.org/doc/qt-4.8/index.html]...
A .zip file that contains the source code of each chapter is provided so you can compare it with your code:
Source code [http://releases.qt-project.org/learning/developerguides/qtquickappdevintro/qt_quick_app_dev_intro_src.zip]
This tutorial is available in the following formats:
PDF [http://releases.qt-project.org/learning/developerguides/qtquickappdevintro/QtQuickAppDevIntro.pdf]
ePub [http://releases.qt-project.org/learning/developerguides/qtquickappdevintro/QtQuickAppDevIntro.epub]
Qt Help [http://releases.qt-project.org/learning/developerguides/qtquickappdevintro/QtQuickAppDevIntro.qch].
We would greatly appreciate any feedback or comments from you that can help us improve the content of this guide.
Use the Qt Bug Tracker to give us feedback.
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). All rights reserved.
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 2.5.
The full license document is available from http://creativecommons.org/licenses/by-sa/2.5/legalcode .
Qt and the Qt logo is a registered trade mark of Digia plc and/or its subsidiaries and is used pursuant to a license from Digia plc and/or its subsidiaries. All other trademarks are property of their respective owners.
What’s Next?
The next chapter covers how to set up the development environment and run your first Qt Quick application.