Introducing Qt CreatorQt Creator is an integrated development environment (IDE) that provides you with tools to design and develop applications with the Qt application framework. Qt is designed for developing applications and user interfaces once and deploying them across several desktop and mobile operating systems. Qt Creator provides you with tools for accomplishing your tasks throughout the whole application development life-cycle, from creating a project to deploying the application on the target platforms. One of the major advantages of Qt Creator is that it allows a team of developers to share a project across different development platforms with a common tool for development and debugging. The recommended way to build a project is to use a version control system. Store and edit only project source files and the .pro and .pri files (for qmake) or CMakeLists.txt and *.cmake files (for CMake). Do not store files generated by the build system or Qt Creator, such as makefiles, .pro.user, and object files. Other approaches are possible, but we recommend that you do not use network resources, for example. Qt Creator allows you to specify separate build settings for each development platform. By default, shadow builds are used to keep the build specific files separate from the source. You can create separate versions of project files to keep platform-dependent code separate. You can use qmake scopes to select the file to process depending on which platform qmake is run on. Items such as open files, breakpoints, and evaluated expressions are stored in sessions. They are not considered to be part of the information shared across platforms. But why do you need projects? To be able to build and run applications, Qt Creator needs the same information as a compiler would need. This information is specified in the project build and run settings. Creating a project allows you to: Setting up a new project in Qt Creator is aided by a wizard that guides you step-by-step through the project creation process. In the first step, you select the type of the project from the categories: Qt Quick project, Qt widget project, or other project. Next, you select a location for the project and specify settings for it. When you have completed the steps, Qt Creator automatically generates the project with required headers, source files, user interface descriptions and project files, as defined by the wizard. For example, if you choose to create a Qt Quick application, Qt Creator generates a QML file that you can modify with the integrated Qt Quick Designer. In addition to Qt libraries, you can link your application to other libraries, such as system libraries or your own libraries. Further, your own libraries might link to other libraries. To be able to compile your project, you must add the libraries to your project. This also enables code completion and syntax highlighting for the libraries. The procedure of adding a library to a project depends on the build system that you use. Qt Creator uses the version control system's command line clients to access your repositories. The following version control systems are supported: The functions available to you in Qt Creator depend on the version control system. Basic functions are available for all the supported systems. They include comparing files with the latest versions stored in the repository and displaying the differences, viewing versioning history and change details, annotating files, and committing and reverting changes. Qt Creator provides two integrated visual editors, Qt Quick Designer and Qt Designer. Large high-resolution screens, touch input, and significant graphics power are becoming common in portable consumer devices, such as mobile phones, media players, set-top boxes, and netbooks. To fully benefit from these features and to create intuitive, modern-looking, fluid user interfaces, you can use Qt Quick. Qt Quick consists of a rich set of user interface elements, a declarative language for describing user interfaces, and a language runtime. A collection of C++ APIs is used to integrate these high level features with classic Qt applications. You can edit QML code in the code editor or in the integrated Qt Quick Designer. The integration includes project management and code completion. If you need a traditional user interface that is clearly structured and enforces a platform look and feel, you can use the integrated Qt Designer. You can compose and customize your widgets or dialogs and test them using different styles and resolutions. As an IDE, Qt Creator differs from a text editor in that it knows how to build and run applications. It understands the C++ and QML languages as code, not just as plain text. This allows it to: You can use the code editor to write code in Qt C++ or in the QML declarative programming language. QML is an extension to JavaScript, that provides a mechanism to declaratively build an object tree of QML elements. QML improves the integration between JavaScript and Qt's existing QObject based type system, adds support for automatic property bindings and provides network transparency at the language level. Qt Creator is integrated with cross-platform systems for build automation: qmake and CMake. In addition, you can import generic projects that do not use qmake or CMake, and specify that Qt Creator ignores your build system. Qt Creator provides support for building and running Qt applications for desktop environment (Windows, Linux, and Mac OS) and mobile devices (Symbian, Maemo, and MeeGo Harmattan). Build settings allow you to quickly switch between build targets. When you install the Qt SDK, the build and run settings for the Harmattan, Maemo, and Symbian targets are set up automatically. However, you need to install and configure some additional software on the devices to be able to connect to them from the development PC. Note: The only supported build system for mobile applications in Qt Creator is qmake. If you install Qt Creator as part of Qt SDK, the GNU Symbolic Debugger is installed automatically and you should be ready to start debugging after you create a new project. However, you can change the setup to use debugging tools for Windows, for example. You can connect mobile devices to your development PC and debug processes running on the devices. You can use code analysis tools to detect memory leaks, profile cache usage, and profile Qt Quick applications. You can test applications that are intended for mobile devices in the Qt Simulator and Maemo or MeeGo Harmattan emulator, but you also need to test the applications on real devices. Qt Creator is integrated to several external native debuggers: You can use the Qt Creator Debug mode to inspect the state of your application while debugging. You can interact with the debugger in several ways, including the following: Qt Creator displays the raw information provided by the native debuggers in a clear and concise manner with the goal to simplify the debugging process as much as possible without losing the power of the native debuggers. In addition to the generic IDE functionality provided by stack view, views for locals and expressions, registers, and so on, Qt Creator includes features to make debugging Qt-based applications easy. The debugger plugin understands the internal layout of several Qt classes, for example, QString, the Qt containers, and most importantly QObject (and classes derived from it), as well as most containers of the C++ Standard Library and some GCC and Symbian extensions. This deeper understanding is used to present objects of such classes in a useful way. You can use the Qt Creator Debug mode to inspect the state of the application while debugging JavaScript functions. You can set breakpoints, view call stack trace, and examine locals and expressions. When the application is interrupted by a breakpoint, you can use the QML Script Console to execute JavaScript expressions in the current context. You can type JavaScript expressions and use them to get information about the state of the application, such as property values. If you change property values or add properties in the code editor, the changes are updated in the running application when they are saved. While the application is running, you can use the QML Inspector view to explore the object structure, debug animations, and inspect colors. When debugging complex applications, you can use the inspection mode to jump to the position in code where an element is defined. The memory available on devices is limited and you should use it carefully. Qt Creator integrates Valgrind code analysis tools for detecting memory leaks and profiling function execution. These tools are only supported on Linux and Mac OS, but you can run them remotely from Windows. You must download and install them separately to use them from Qt Creator. The QML Profiler is installed as part of Qt Creator. It allows you to profile your Qt Quick applications and is available on all supported development platforms. You can use the Qt Simulator to test Qt applications that are intended for mobile devices in an environment similar to that of the device. You can change the information that the device has about its configuration and environment. Qt Simulator does not support any device specific APIs by design. Therefore, applications that run well on Qt Simulator also run on any device that hosts the Qt and Qt Mobility libraries. However, this means that you cannot use Qt Simulator to test applications that use device specific libraries, such as Symbian C++ APIs. To test such applications, use the device emulators or real devices. The Qt Simulator is installed as part of the Qt SDK. After it is installed, you can select it as a build target in Qt Creator. The Maemo 5 (Fremantle) and MeeGo Harmattan emulator are installed as part of the Qt SDK. After they are installed, you can start them from Qt Creator. The Maemo 5 emulator emulates the Nokia N900 device environment. You can test applications in conditions practically identical to running the application on a Nokia N900 device with the software update release 1.3 (V20.2010.36-2). The Harmattan emulator emulates the Nokia N9 device environment. With the emulators, you can test how your application reacts to hardware controls, such as the power button, and to the touch screen. Usually, it is faster to test on a real device connected to the development PC than to use the emulators. Qt Creator deploy configurations handle the packaging of the application as an executable and copying it to a location developers want to run the executable at. The files can be copied to a location in the file system of the development PC or to a mobile device. Qt Creator allows you to create installation packages for Symbian, Maemo, and MeeGo Harmattan devices that are suitable for publishing on Ovi Store and other channels. X
|