creator-overview.qdoc 14.2 KB
Newer Older
1 2 3 4 5 6
** This file is part of Qt Creator
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (
8 9 10 11 12 13 14 15 16 17
** GNU Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
** If you have questions regarding the use of this file, please contact
** Nokia at
19 20 21 22 23 24 25 26 27 28 29

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the script to adjust the links to the index order.
// **********************************************************************

    \contentspage index.html
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
    \previouspage creator-getting-started.html
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
    \page creator-overview.html
    \nextpage creator-quick-tour.html

    \title IDE Overview

    \QC 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. \QC
    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.

    \image qtcreator-overview.png "Overview"

    \section1 Cross-platform Development

    One of the major advantages of \QC 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 build system configuration
    files (for example, .pro and .pri files for qmake). Do not store files
    generated by the build system or \QC, such as makefiles, .pro.user, and
    object files. Other approaches are possible, but we recommend that you do
    not use network resources, for example.

    \QC allows you to specify separate build settings for each development
    platform. By default, \l{glossary-shadow-build}{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.

    \section1 Creating Projects

    But why do you need projects? To be able to build and run applications,
    \QC 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:


        \o  Group files together

        \o  Add custom build steps

        \o  Include forms and resource files

        \o  Specify settings for running applications


    Setting up a new project in \QC 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. Next, you select a location for the project
    and specify settings for it.

    \image qtcreator-new-qt-quick-project-wizard.png

    When you have completed the steps, \QC 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, \QC generates a
    QML file that you can modify with the integrated \QMLD.

    \section2 Adding Libraries

    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.

    \section2 Version Control Systems

    \QC uses the version control system's command line clients to access your
    repositories. The following version control systems are supported:


        \o  Git

        \o  Subversion

        \o  Perforce

        \o  CVS

        \o  Mercurial

        \o  Bazaar


    The functions available to you in \QC 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.

    \section1 Designing User Interfaces

    \if defined(qcmanual)
    \QC provides two integrated visual editors, \QMLD and \QD.

    \image qtcreator-ui-designers.png "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 \l {}
    {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 \QMLD.
    The integration includes project management and code completion.

    \if defined(qcmanual)
    If you need a traditional user interface that is clearly structured and
    enforces a platform look and feel, you can use the integrated \QD. You can
    compose and customize your widgets or dialogs and test them using different
    styles and resolutions.

    \section1 Code Editor

    As an IDE, \QC 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:


        \o  Enable you to write well formatted code

        \o  Anticipate what you are going to write and complete the code

        \o  Display inline error and warning messages

        \o  Enable you to semantically navigate to classes, functions, and

        \o  Provide you with context-sensitive help on classes, functions, and

        \o  Rename symbols in an intelligent way, so that other symbols with the
            same name that belong to other scopes are not renamed

        \o  Show you the locations in code where a function is declared or


    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.

    \section1 Building

    \QC 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 \QC ignores your build system.
    \if defined(qcmanual)
    \QC 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 tool chains for build targets as part of the \QSDK, the
    build and run settings for mobile device targets are set up automatically.
    However, you might 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 \QC is

    \section1 Testing

    If you install \QC as part of \QSDK, 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 a
    simulator or emulator, but you also need to test the applications on real

    \section2 Debuggers

    \QC is integrated to several external native debuggers:


        \o  GNU Symbolic Debugger (GDB)

        \o  Microsoft Console Debugger (CDB)

        \o  internal JavaScript debugger


    You can use the \QC \gui Debug mode to inspect the state of your application
    while debugging. You can interact with the debugger in several ways,
    including the following:


        \o  Go through a program line-by-line or instruction-by-instruction.

        \o  Interrupt running programs.

        \o  Set breakpoints.

        \o  Examine the contents of the call stack.

        \o  Examine and modify registers and memory contents of
            the debugged program.

        \o  Examine and modify registers and memory contents of
            local and global variables.

        \o  Examine the list of loaded shared libraries.

        \o  Create snapshots of the current state of the debugged program
            and re-examine them later.


    \QC 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, \QC 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 extensions.
    This deeper understanding is used to present objects of such classes in a
    useful way.

    \section3 QML Script Console

    You can use the \QC \gui 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
    \gui {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.

    \section3 QML Inspector

    While the application is running, you can use the \gui {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.

    \section2 Code Analysis Tools

    The memory available on devices is limited and you should use it carefully.
    \QC 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 \QC.

    The QML Profiler is installed as part of \QC. It allows you
    to profile your Qt Quick applications and is available on all supported
    development platforms.

    \section2 Qt Simulator

    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 \QSDK. After it is
    installed, you can select it as a build target in \QC.

    \if defined(qcmanual)
    \input linux-mobile/madde-emulator-overview.qdocinc

    \section1 Deploying

    \QC 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.

    \QC allows you to create installation packages for mobile devices that are
    suitable for publishing to Nokia Store and other channels.
363 364