qtcreator.qdoc 471 KB
Newer Older
Leena Miettinen's avatar
Leena Miettinen committed
1
2
/****************************************************************************
**
Leena Miettinen's avatar
Leena Miettinen committed
3
4
** This file is part of Qt Creator
**
con's avatar
con committed
5
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
Leena Miettinen's avatar
Leena Miettinen committed
6
**
hjk's avatar
hjk committed
7
** Contact: Nokia Corporation (info@qt.nokia.com)
Leena Miettinen's avatar
Leena Miettinen committed
8
9
10
**
**
** GNU Free Documentation License
Leena Miettinen's avatar
Leena Miettinen committed
11
**
Leena Miettinen's avatar
Leena Miettinen committed
12
13
14
15
16
17
** 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
Tobias Hunger's avatar
Tobias Hunger committed
18
** Nokia at info@qt.nokia.com.
Leena Miettinen's avatar
Leena Miettinen committed
19
20
21
**
****************************************************************************/

22
23
24
25
26
27
// **********************************************************************
// 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 fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

28

con's avatar
con committed
29
30
31
/*!
    \contentspage{index.html}{Qt Creator}
    \page index.html
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
32
    \nextpage creator-overview.html
con's avatar
con committed
33
34
35

    \title Qt Creator Manual

36
    \section1 Version \qtcversion
con's avatar
con committed
37

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
38
    Qt Creator provides a cross-platform, complete integrated development
39
40
    environment (IDE) for application developers to create applications for
    multiple desktop and mobile device platforms. It is available for Linux,
41
    Mac OS X and Windows operating systems. For more information, see
42
    \l{Operating Systems and Supported Platforms}.
con's avatar
con committed
43

44
45
    \note To report bugs and suggestions to the Qt Bug Tracker, select
    \gui {Help > Report Bug}.
46
47
    You can also join the Qt Creator mailing list at:
    \l{http://lists.qt.nokia.com}{http://lists.qt.nokia.com}.
con's avatar
con committed
48

49
50
    \raw HTML
    <img border="0" style="float:right;" src="images/qtcreator-screenshots.png" />
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
51
    \endraw
52

con's avatar
con committed
53
    \list
Leena Miettinen's avatar
Leena Miettinen committed
54
       \o \l{Introducing Qt Creator}
55
       \o \l{Qt Creator User Interface}
56
57
       \o \l{Getting Started}
           \list
58
               \o \l{Building and Running an Example Application}
59
               \o \l{Creating a Qt Quick Application}
60
61
62
63
               \o \l{Creating a Qt Quick Application Using Qt Quick Components}
               \o \l{Creating a Qt Widget Based Application}
               \o \l{Creating a Qt Widget Based Mobile Application}

64
           \endlist
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
65
66
67
       \o \l{Managing Projects}
            \list
                \o \l{Creating a Project}
Leena Miettinen's avatar
Leena Miettinen committed
68
                \o \l{Opening a Project}
Leena Miettinen's avatar
Leena Miettinen committed
69
                \o \l{Adding Libraries to Projects}
Leena Miettinen's avatar
Leena Miettinen committed
70
                \o \l{Connecting Maemo and MeeGo Harmattan Devices}
71
                \o \l{Connecting Generic Linux Devices}
Leena Miettinen's avatar
Leena Miettinen committed
72
                \o \l{Connecting Symbian Devices}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
73
74
                \o \l{Managing Sessions}
            \endlist
Leena Miettinen's avatar
Leena Miettinen committed
75
       \o \l{Coding}
76
            \list
Leena Miettinen's avatar
Leena Miettinen committed
77
78
79
80
                \o \l{Using the Editor}
                \o \l{Semantic Highlighting}
                \o \l{Checking Code Syntax}
                \o \l{Completing Code}
Leena Miettinen's avatar
Leena Miettinen committed
81
                \o \l{Indenting Code}
82
83
                \o \l{Finding and Replacing}
                \o \l{Refactoring}
84
                \o \l{Using Qt Quick Toolbars}
85
86
                \o \l{Searching With the Locator}
                \o \l{Pasting and Fetching Code Snippets}
87
                \o \l{Using Text Editing Macros}
88
89
90
91
92
93
94
95
                \o \l{Configuring the Editor}
                \o \l{Using FakeVim Mode}
            \endlist
       \o \l{Developing Application UI}
       \list
           \o \l{Developing Qt Quick Applications}
                \list
                    \o \l {Creating Qt Quick Projects}
96
                    \o \l {Using Qt Quick Designer}
97
                    \o \l {Creating Components}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
98
99
                    \o \l {Creating Buttons}
                    \o \l {Creating Scalable Buttons and Borders}
100
101
102
                    \o \l {Creating Screens}
                    \o \l {Animating Screens}
                    \o \l {Adding User Interaction Methods}
Leena Miettinen's avatar
Leena Miettinen committed
103
                    \o \l {Exporting Designs from Graphics Software}
104
                    \o \l {Implementing Application Logic}
105
                    \o \l {Using QML Modules with Plugins}
106
                \endlist
107
108
           \o \l{Developing Widget Based Applications}
           \o \l{Optimizing Applications for Mobile Devices}
109
       \endlist
110
111
       \o \l{Building and Running Applications}
            \list
112
113
                \o \l{Building Applications for Multiple Targets}
                \o \l{Running Applications on Multiple Targets}
114
                \o \l{Specifying Build Settings}
Leena Miettinen's avatar
Leena Miettinen committed
115
116
117
118
                   \list
                       \o \l{Adding Qt Versions}
                       \o \l{Adding Tool Chains}
                   \endlist
119
                \o \l{Specifying Run Settings}
120
                \o \l{Specifying Editor Settings}
Leena Miettinen's avatar
Leena Miettinen committed
121
                \o \l{Specifying Code Style Settings}
122
123
                \o \l{Specifying Dependencies}
            \endlist
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
124
       \o \l{Debugging}
125
126
            \list
                \o \l{Debugging the Example Application}
127
                \o \l{Launching the Debugger}
128
129
130
                \o \l{Interacting with the Debugger}
                \o \l{Setting Up Debugger}
                \o \l{Using Debugging Helpers}
131
                \o \l{Debugging Qt Quick Projects}
132
                \o \l{Troubleshooting Debugger}
133
            \endlist
134
135
136
137
       \o \l{Analyzing Code}
           \list
                \o \l{Profiling QML Applications}
                \o \l{Detecting Memory Leaks}
138
                \o \l{Profiling Function Execution}
139
                \o \l{Running Valgrind Tools Remotely}
140
           \endlist
141
142
143
       \o \l{Deploying Applications to Mobile Devices}
            \list
                \o \l{Deploying Applications to Symbian Devices}
Leena Miettinen's avatar
Leena Miettinen committed
144
                \o \l{Deploying Applications to Maemo or MeeGo Harmattan Devices}
Leena Miettinen's avatar
Leena Miettinen committed
145
                \o \l{Publishing Maemo Applications to Extras-devel}
146
147
148
                \o \l{Publishing Applications to Ovi Store}
                \o \l{Building with Remote Compiler}
            \endlist
149
       \o \l{Getting Help}
Leena Miettinen's avatar
Leena Miettinen committed
150
151
152
153
154
155
156
157
158
       \o \l{Advanced Use}
           \list
               \o \l{Operating Systems and Supported Platforms}
               \o \l{Adding New Custom Wizards}
               \o \l{Setting Up a CMake Project}
               \o \l{Setting Up a Generic Project}
               \o \l{Using Version Control Systems}
               \o \l{Adding Qt Designer Plugins}
               \o \l{Using External Tools}
Leena Miettinen's avatar
Leena Miettinen committed
159
               \o \l{Using Maemo or MeeGo Harmattan Emulator}
Leena Miettinen's avatar
Leena Miettinen committed
160
161
162
163
164
               \o \l{Editing MIME Types}
               \o \l{Showing Task List Files in the Build Issues Pane}
               \o \l{Using Command Line Options}
               \o \l{Keyboard Shortcuts}
           \endlist
Leena Miettinen's avatar
Leena Miettinen committed
165
166
       \o \l{FAQ}
       \o \l{Tips and Tricks}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
167
       \o \l{Known Issues}
Leena Miettinen's avatar
Leena Miettinen committed
168
       \o \l{Technical Support}
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
169
170
       \o \l{Glossary}
       \o \l{Acknowledgements}
con's avatar
con committed
171
172
173
    \endlist
*/

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
174

con's avatar
con committed
175
176
/*!
    \contentspage index.html
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
177
    \previouspage index.html
Leena Miettinen's avatar
Leena Miettinen committed
178
    \page creator-overview.html
Leena Miettinen's avatar
Leena Miettinen committed
179
    \nextpage creator-quick-tour.html
Leena Miettinen's avatar
Leena Miettinen committed
180
181
182

  \title Introducing Qt Creator

Leena Miettinen's avatar
Leena Miettinen committed
183
    Qt Creator is an integrated development environment (IDE) that provides you with
Leena Miettinen's avatar
Leena Miettinen committed
184
185
186
187
188
    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.
189

190
    \image qtcreator-overview.png "Qt Creator overview"
191

192
    \section1 Cross-platform Development
193

Leena Miettinen's avatar
Leena Miettinen committed
194
195
196
197
    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.

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    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, \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
    \l{http://qt.nokia.com/doc/4.7/qmake-tutorial.html#adding-platform-specific-source-files}{scopes}
    to select the file to process depending on which platform qmake is run on.

214
    Items such as open files, breakpoints, and evaluated expressions are stored in
215
216
217
    sessions. They are not considered to be part of the
    information shared across platforms.

Leena Miettinen's avatar
Leena Miettinen committed
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    \section1 Creating Projects

    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:

        \list

            \o Group files together

            \o Add custom build steps

            \o Include forms and resource files

            \o Specify settings for running applications

        \endlist

    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
Leena Miettinen's avatar
Leena Miettinen committed
240
241
    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
Leena Miettinen's avatar
Leena Miettinen committed
242
243
244
245
246
247
248
249
250
251
252
    specify settings for it.

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

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

    \section2 Adding Libraries
253
254
255
256
257
258

    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.
Leena Miettinen's avatar
Leena Miettinen committed
259
    The procedure of adding a library to a project depends on the build
260
261
    system that you use.

Leena Miettinen's avatar
Leena Miettinen committed
262
    \section2 Version Control Systems
263

Leena Miettinen's avatar
Leena Miettinen committed
264
265
    Qt Creator uses the version control system's command line clients to access
    your repositories. The following version control systems are supported:
266

Leena Miettinen's avatar
Leena Miettinen committed
267
    \list
268

Leena Miettinen's avatar
Leena Miettinen committed
269
        \o Git
270

Leena Miettinen's avatar
Leena Miettinen committed
271
        \o Subversion
272

Leena Miettinen's avatar
Leena Miettinen committed
273
        \o Perforce
274

Leena Miettinen's avatar
Leena Miettinen committed
275
        \o CVS
276

Leena Miettinen's avatar
Leena Miettinen committed
277
        \o Mercurial
278

Leena Miettinen's avatar
Leena Miettinen committed
279
280
        \o Bazaar

Leena Miettinen's avatar
Leena Miettinen committed
281
    \endlist
282

Leena Miettinen's avatar
Leena Miettinen committed
283
284
285
286
287
    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.
288

Leena Miettinen's avatar
Leena Miettinen committed
289
    \section1 Designing User Interfaces
290

Leena Miettinen's avatar
Leena Miettinen committed
291
    Qt Creator provides two integrated visual editors, \QMLD and \QD.
292

Leena Miettinen's avatar
Leena Miettinen committed
293
    \image qtcreator-ui-designers.png "Qt Quick Designer and Qt Designer"
294

Leena Miettinen's avatar
Leena Miettinen committed
295
296
297
298
299
    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 {http://doc.qt.nokia.com/4.7/qtquick.html}{Qt Quick}.
300

Leena Miettinen's avatar
Leena Miettinen committed
301
302
303
304
    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.
305

Leena Miettinen's avatar
Leena Miettinen committed
306
307
    You can edit QML code in the code editor or in the integrated \QMLD.
    The integration includes project management and code completion.
Leena Miettinen's avatar
Leena Miettinen committed
308

Leena Miettinen's avatar
Leena Miettinen committed
309
310
311
312
    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.
Leena Miettinen's avatar
Leena Miettinen committed
313

Leena Miettinen's avatar
Leena Miettinen committed
314
    \section1 Code Editor
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

    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:

    \list

        \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 symbols

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

        \o Rename symbols in an intelligent way, so that other symbols with the same name
333
         that belong to other scopes are not renamed
Leena Miettinen's avatar
Leena Miettinen committed
334

335
        \o Show you the locations in code where a function is declared or called
Leena Miettinen's avatar
Leena Miettinen committed
336

337
    \endlist
Leena Miettinen's avatar
Leena Miettinen committed
338

Leena Miettinen's avatar
Leena Miettinen committed
339
    You can use the code editor to write code in Qt C++ or in the
Leena Miettinen's avatar
Leena Miettinen committed
340
    QML declarative programming language.
Leena Miettinen's avatar
Leena Miettinen committed
341
342
343
344
    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.
Leena Miettinen's avatar
Leena Miettinen committed
345

Leena Miettinen's avatar
Leena Miettinen committed
346
    \section1 Building
Leena Miettinen's avatar
Leena Miettinen committed
347

Leena Miettinen's avatar
Leena Miettinen committed
348
349
350
    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.
Leena Miettinen's avatar
Leena Miettinen committed
351

Leena Miettinen's avatar
Leena Miettinen committed
352
    Qt Creator provides support for building and running Qt applications for
Leena Miettinen's avatar
Leena Miettinen committed
353
354
    desktop environment (Windows, Linux, and Mac OS) and mobile devices
    (Symbian, Maemo, and MeeGo Harmattan).
Leena Miettinen's avatar
Leena Miettinen committed
355
    Build settings allow you to quickly switch between build targets.
Leena Miettinen's avatar
Leena Miettinen committed
356

Leena Miettinen's avatar
Leena Miettinen committed
357
358
    When you install the \QSDK, the build and run settings for the Harmattan,
    Maemo, and Symbian
Leena Miettinen's avatar
Leena Miettinen committed
359
360
361
    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.
Leena Miettinen's avatar
Leena Miettinen committed
362

Leena Miettinen's avatar
Leena Miettinen committed
363
364
    \note The only supported build system for mobile applications in Qt
    Creator is qmake.
Leena Miettinen's avatar
Leena Miettinen committed
365

Leena Miettinen's avatar
Leena Miettinen committed
366
    \section1 Testing
Leena Miettinen's avatar
Leena Miettinen committed
367

Leena Miettinen's avatar
Leena Miettinen committed
368
369
370
371
372
373
    If you install Qt Creator 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.
Leena Miettinen's avatar
Leena Miettinen committed
374

375
376
377
378
    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
379
380
    Simulator and Maemo or MeeGo Harmattan emulator, but you also need to test
    the applications
Leena Miettinen's avatar
Leena Miettinen committed
381
    on real devices.
Leena Miettinen's avatar
Leena Miettinen committed
382

Leena Miettinen's avatar
Leena Miettinen committed
383
    \section2 Debuggers
Leena Miettinen's avatar
Leena Miettinen committed
384

Leena Miettinen's avatar
Leena Miettinen committed
385
    Qt Creator is integrated to several external native debuggers:
Leena Miettinen's avatar
Leena Miettinen committed
386
387
388

    \list

389
        \o GNU Symbolic Debugger (GDB)
Leena Miettinen's avatar
Leena Miettinen committed
390
391
392

        \o Microsoft Console Debugger (CDB)

Leena Miettinen's avatar
Leena Miettinen committed
393
        \o internal JavaScript debugger
Leena Miettinen's avatar
Leena Miettinen committed
394
395
396

    \endlist

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
    You can use the Qt Creator \gui Debug mode to inspect the state of your
    application while debugging. You can interact with the debugger in several
    ways, including the following:

    \list
        \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.
    \endlist

Leena Miettinen's avatar
Leena Miettinen committed
415
416
417
    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.
418
419

    In addition to the generic IDE functionality provided by stack view, views for
420
    locals and expressions, registers, and so on, Qt Creator includes
421
422
423
424
    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++
425
    Standard Library and some GCC and Symbian extensions. This
426
427
428
    deeper understanding is used to present objects of such classes in
    a useful way.

Leena Miettinen's avatar
Leena Miettinen committed
429
    \section3 QML Script Console
Leena Miettinen's avatar
Leena Miettinen committed
430

Leena Miettinen's avatar
Leena Miettinen committed
431
432
    You can use the Qt Creator \gui Debug mode to inspect the state of
    the application while debugging JavaScript functions. You can set breakpoints,
433
    view call stack trace, and examine locals and expressions.
Leena Miettinen's avatar
Leena Miettinen committed
434
435
436
437
438
439
440
441
442

    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.

443
    \section3 QML Inspector
Leena Miettinen's avatar
Leena Miettinen committed
444

445
    While the application is running, you can use the \gui {QML Inspector} view to
Leena Miettinen's avatar
Leena Miettinen committed
446
    explore the object structure, debug animations, and inspect colors. When debugging
447
    complex applications, you can use the inspection mode to jump to the position in code
Leena Miettinen's avatar
Leena Miettinen committed
448
449
    where an element is defined.

450
451
452
453
    \section2 Code Analysis Tools

    The memory available on devices is limited and you should use it carefully.
    Qt Creator integrates Valgrind code analysis tools for detecting memory
454
    leaks and profiling function execution. These tools are only supported on
455
456
    Linux and Mac OS, but you can run them remotely from Windows. You must
    download and install them separately to use them from Qt
457
458
459
460
461
462
    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.

Leena Miettinen's avatar
Leena Miettinen committed
463
464
465
466
467
468
469
    \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.

Leena Miettinen's avatar
Leena Miettinen committed
470
471
472
473
474
475
476
    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.

Leena Miettinen's avatar
Leena Miettinen committed
477
478
479
    The Qt Simulator is installed as part of the \QSDK. After it is
    installed, you can select it as a build target in Qt Creator.

Leena Miettinen's avatar
Leena Miettinen committed
480
481
482
483
    \section2 Maemo and MeeGo Harmattan Emulator

    The Maemo 5 (Fremantle) and MeeGo Harmattan emulator are installed as part
    of the \QSDK. After they are installed, you can start them from Qt Creator.
Leena Miettinen's avatar
Leena Miettinen committed
484

485
    The Maemo 5 emulator emulates the Nokia N900 device environment. You can test
Leena Miettinen's avatar
Leena Miettinen committed
486
    applications in conditions practically identical to running the application
487
    on a Nokia N900 device with the software update release 1.3 (V20.2010.36-2).
Leena Miettinen's avatar
Leena Miettinen committed
488

489
    The Harmattan emulator emulates the Nokia N9 device environment.
Leena Miettinen's avatar
Leena Miettinen committed
490
491
492
493
494

    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.
Leena Miettinen's avatar
Leena Miettinen committed
495
496
497
498
499
500
501
502

    \section1 Deploying

    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.

Leena Miettinen's avatar
Leena Miettinen committed
503
504
    Qt Creator allows you to create installation packages for Symbian, Maemo,
    and MeeGo Harmattan
Leena Miettinen's avatar
Leena Miettinen committed
505
    devices that are suitable for publishing on Ovi Store and other channels.
506

Leena Miettinen's avatar
Leena Miettinen committed
507
508
509
510
*/

/*!
    \contentspage index.html
Leena Miettinen's avatar
Leena Miettinen committed
511
    \previouspage creator-advanced.html
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
512
    \page creator-os-supported-platforms.html
Leena Miettinen's avatar
Leena Miettinen committed
513
    \nextpage creator-project-wizards.html
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
514
515
516
517
518
519
520
521

    \title Operating Systems and Supported Platforms

    \section1 Operating Systems

    Qt Creator is available in binary packages for the following operating
    systems:
    \list
522
        \o Windows 7
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
523
524
        \o Windows XP Service Pack 2
        \o Windows Vista
525
        \o (K)Ubuntu Linux 8.04 (32-bit and 64-bit) or later, with the following:
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
           \list
               \o g++
               \o make
               \o libglib2.0-dev
               \o libSM-dev
               \o libxrender-dev
               \o libfontconfig1-dev
               \o libxext-dev
               \o libfreetype6-dev
               \o libx11-dev
               \o libxcursor-dev
               \o libxfixes-dev
               \o libxft-dev
               \o libxi-dev
               \o libxrandr-dev
541
               \o If you are using QtOpenGL, libgl-dev and libglu-dev
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
542
           \endlist
543
        \o Mac OS 10.5 or later with the following:
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
544
545
546
547
548
549
           \list
               \o Xcode tools for your Mac OS X version available from your Mac
                  OS X installation DVDs or at \l http://developer.apple.com.
           \endlist
    \endlist

550
551
         \omit  ## Are the Xcode tools still needed separately? \endomit

552
    \section1 Compiling Qt Creator from Source
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
553

554
555
    To build Qt Creator itself from the source, see the requirements and
    instructions in the readme file that is located in the source repository.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
556

557
558
559
    \section1 Supported Platforms

    You can develop applications for the following platforms:
560
561
562

    \list

563
564
565
566
567
        \o Desktop

        \o Qt Simulator

        \o Maemo 5
568

Leena Miettinen's avatar
Leena Miettinen committed
569
570
        \o MeeGo Harmattan

571
572
        \o Generic remote Linux

573
        \o Symbian
574
575
576

    \endlist

577
    The following table summarizes operating system support for developing
578
    applications for mobile device platforms.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
579
580
581

    \table
        \header
582
583
            \o {1,6} Operating system
            \o {6,1} Platform
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
584
585
        \header
            \o Desktop
586
            \o Qt Simulator
Leena Miettinen's avatar
Leena Miettinen committed
587
588
            \o Maemo 5
            \o MeeGo Harmattan
589
            \o Generic Remote Linux
590
591
            \o Symbian

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
592
593
594
595
        \row
            \o Windows
            \o Yes
            \o Yes
596
            \o Yes
597
            \o Yes
Leena Miettinen's avatar
Leena Miettinen committed
598
            \o Yes
599
            \o Yes
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
600
601
602
        \row
            \o Linux
            \o Yes
603
            \o Yes
604
            \o Yes
Leena Miettinen's avatar
Leena Miettinen committed
605
            \o Yes
606
            \o Yes
607
            \o Yes (by using Remote Compiler for building)
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
608
609
610
        \row
            \o Mac OS X
            \o Yes
611
            \o Yes
612
            \o Yes
Leena Miettinen's avatar
Leena Miettinen committed
613
            \o Yes
614
            \o Yes
615
            \o Yes (by using Remote Compiler for building)
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
616
617
618
619
620
621
    \endtable
*/


/*!
    \contentspage index.html
Leena Miettinen's avatar
Leena Miettinen committed
622
    \previouspage creator-overview.html
con's avatar
con committed
623
    \page creator-quick-tour.html
624
    \nextpage creator-getting-started.html
con's avatar
con committed
625

626
    \title Qt Creator User Interface
con's avatar
con committed
627
628
629

    \image qtcreator-breakdown.png

630
631
632
633
    When you start Qt Creator, it opens to the \gui Welcome mode, where you can:

    \list

634
        \o Read news from the Qt labs
635

636
        \o Open tutorials and example projects
637
638
639
640
641
642
643
644
645
646

        \o Create and open projects

        \o Send feedback to the development team

        \o Open recent sessions and projects

    \endlist

    You can use the mode selector to change to another Qt Creator mode.
647
648
649
650
    The following image displays an example application in \gui Edit mode
    and \gui Design mode.

    \image qtcreator-qt-quick-editors.png "Edit mode and Design mode"
651

652
653
654
655
656
    Qt Creator has been localized into several languages. If the system language
    is one of the supported languages, it is automatically selected. To change
    the language, select \gui {Tools > Options > Environment} and select a language
    in the \gui Language field. The change takes effect after you restart Qt Creator.

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
657
    \section1 Qt Creator Modes
con's avatar
con committed
658

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
659
    The mode selector allows you to quickly switch between tasks such as
660
661
    editing project and source files, designing application UIs,
    configuring how projects are built and
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
662
663
    executed, and debugging your applications. To change modes, click the
    icons, or use the \l{keyboard-shortcuts}{corresponding keyboard shortcut}.
con's avatar
con committed
664

665
666
    You can use Qt Creator in the following modes:

con's avatar
con committed
667
    \list
668
        \o \gui Welcome mode for opening projects.
669
        \o \gui{\l{Using the Editor}{Edit}} mode for editing project and source files.
670
        \o \gui{\l{Developing Application UI}{Design}} mode for designing and developing
671
672
           application user interfaces. This mode is available for UI files (.ui or
           .qml).
673
674
        \o \gui{\l{Debugging}{Debug}} mode for inspecting the state of your program while
           debugging.
675
        \o \gui{\l{Specifying Build Settings}{Projects}} mode for configuring project building and
676
           execution. This mode is available when a project is open.
677
678
        \o \gui{\l{Analyzing Code}{Analyze}} mode for using code analysis tools
            to detect memory leaks and profile C++ or QML code.
679
        \o \gui{\l{Getting Help}{Help}} mode for viewing Qt documentation.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
680
681
    \endlist

682
    Certain actions in Qt Creator trigger a mode change. Clicking on
683
    \gui {Debug} > \gui {Start Debugging} > \gui {Start Debugging}
684
    automatically switches to \gui {Debug} mode.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
685
686


687
    \section1 Browsing Project Contents
con's avatar
con committed
688

689
    The sidebar is available in the \gui Edit and \gui Debug modes.
690
691
    Use the sidebar to browse projects, files, and bookmarks, and to view
    the class hierarchy.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
692
    \image qtcreator-sidebar.png
con's avatar
con committed
693

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
694
695
696
697
698
    You can select the content of the sidebar in the sidebar menu:
    \list
        \o \gui Projects shows a list of projects open in the current
           session.
        \o \gui{Open Documents} shows currently open files.
699
700
701
702
703
        \o \gui Bookmarks shows all bookmarks for the current session.
        \o \gui{File System} shows all files in the currently selected
            directory.
        \o \gui {Class View} shows the class hierarchy of the currently
            open projects.
704
        \o \gui Outline shows the symbol hierachy of a C++ file and the element hierarchy of a QML file.
705
        \o \gui {Type Hierarchy} shows the base classes of a class.
706

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
707
    \endlist
con's avatar
con committed
708

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
709
710
711
712
713
    You can change the view of the sidebar in the following ways:
    \list
        \o To toggle the sidebar, click \inlineimage qtcreator-togglebutton.png
           or press \key Alt+0 (\key Cmd+0 on Mac OS X).
        \o To split the sidebar, click \inlineimage qtcreator-splitbar.png
714
           . Select new content to view in the split view.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
715
716
717
718
        \o To close a sidebar view, click
           \inlineimage qtcreator-closesidebar.png
           .
    \endlist
con's avatar
con committed
719

720
721
    The additional options in each view are described in the following
    sections.
con's avatar
con committed
722

723
    \section2 Viewing Project Files
con's avatar
con committed
724

725
726
727
    The sidebar displays projects in a project tree. The project tree contains
    a list of all projects open in the current session. The files for each
    project are grouped according to their file type.
con's avatar
con committed
728

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
729
730
    You can use the project tree in the following ways:
    \list
731
732
        \o To bring up a context menu containing the actions most commonly
           needed right-click an item in the project tree.
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
733
           For example, through the menu of the project root directory you can,
734
           among other actions, build, re-build, clean and run the project.
735
        \o To hide the categories and sort project files alphabetically, click
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
736
           \inlineimage qtcreator-filter.png
737
           and select \gui{Simplify Tree}.
738
739
        \o To hide source files which are automatically generated by the build
           system, during a build, click \inlineimage qtcreator-filter.png
740
741
742
           and select \gui{Hide Generated Files}.
        \o To keep the position in the project tree synchronized with the file
           currently opened in the editor, click
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
743
744
745
746
           \inlineimage qtcreator-synchronizefocus.png
           .
        \o To see the absolute path of a file, move the mouse pointer over the
           file name.
con's avatar
con committed
747
748
    \endlist

749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
    \section2 Viewing the File System

    If you cannot see a file in the \gui Projects view, switch to the
    \gui {File System} view, which shows all the files in the file system.

    To keep the position in the tree synchronized with the file
    opened in the editor, click
    \inlineimage qtcreator-synchronizefocus.png
    .

    \section2 Viewing the Class Hierarchy

    The \gui {Class View} shows the class hierarchy of the currently
    open projects. To organize the view by subprojects, click
    \inlineimage qtcreator-show-subprojects.png
    .

    \section2 Viewing QML Elements

    The \gui Outline view shows the element hierarchy in a QML file.

    \list

        \o To see a complete list of all bindings, click
           \inlineimage qtcreator-filter.png
           and select \gui{Show All Bindings}.

        \o To keep the position in the view synchronized with the element
           selected in the editor, click
           \inlineimage qtcreator-synchronizefocus.png
           .

    \endlist
con's avatar
con committed
782

783
784
785
786
787
    \section2 Viewing Type Hierarchy

    To view the base classes of a class, right-click the class and select
    \gui {Open Type Hierarchy}  or press \key {Ctrl+Shift+T}.

788
    \section1 Viewing Output
con's avatar
con committed
789

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
790
    The task pane in Qt Creator can display one of the following panes:
791
792
793
794
795
    \list
       \o  \gui{Build Issues}
       \o  \gui{Search Results}
       \o  \gui{Application Output}
       \o  \gui{Compile Output}
796
797
       \o  \gui{General Messages}
       \o  \gui{Version Control}
798
799
800
    \endlist

    Output panes are available in all \l{Qt Creator modes}{modes}.
801
802
803
    Click the name of an output pane to open the pane. To maximize
    an open output pane, click the \gui {Maximize Output Pane} button
    or press \key {Alt+9}.
con's avatar
con committed
804

Leena Miettinen's avatar
Leena Miettinen committed
805
806
807
808
809
    To search within the \gui{Application Output} and \gui{Compile Output}
    panes, press \key {Ctrl+F} when the pane is active. Enter search
    criteria in the \gui Find field and click the left and right arrows to
    search down and up in the pane.

Leena Miettinen's avatar
Leena Miettinen committed
810
    To open the \gui{General Messages} and \gui{Version Control}
811
812
    panes, select \gui {Window > Output Panes}.

813

814
    \section2 Build Issues
con's avatar
con committed
815

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
816
    The \gui{Build Issues} pane provides a list of errors and warnings
817
    encountered during a build. The pane filters out irrelevant output from
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
818
    the build tools and presents the issues in an organized way.
con's avatar
con committed
819

820
821
822
823
    Right-clicking on a line brings up a context menu with options to copy
    the contents and to show a version control annotation view of the
    line that causes the error message.

824
    \image qtcreator-build-issues.png
con's avatar
con committed
825

826
827
828
829
830
831
    To view task lists in the \gui{Build Issues} pane, click
    \inlineimage qtcreator-filter.png
    and select \gui{My Tasks}. Entries from a task list file (.tasks) are
    imported to the pane. Press \key F6 and \key Shift+F6 to jump from one issue
    to the next.

832
833
    For more information about creating task files, see
    \l{Showing Task List Files in the Build Issues Pane}.
834

con's avatar
con committed
835
836
    \section2 Search Results

837
838
839
840
841
    The \gui{Search Results} pane displays the results for global searches,
    for example, searching within a current document, files on disk, or all
    projects.

    The figure below shows an example search result for all
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
842
    occurrences of \c textfinder within the \c "/TextFinder" directory.
con's avatar
con committed
843
844
845

    \image qtcreator-search-pane.png

846

con's avatar
con committed
847
848
    \section2 Application Output

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
849
    The \gui{Application Output} pane displays the status of a program when
850
851
852
    it is executed, and the debug output.

    The figure below shows an example output from qDebug().
con's avatar
con committed
853
854
855

    \image qtcreator-application-output.png

856

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
857
    \section2 Compile Output
con's avatar
con committed
858

859
860
861
    The \gui{Compile Output} pane provides all output from the compiler.
    The \gui{Compile Output} is a more detailed version of information
    displayed in the \gui{Build Issues} pane.
con's avatar
con committed
862
863
864

    \image qtcreator-compile-pane.png

865
866
867
868
869
870
871
872
873
874
    \section1 Navigating with Keyboard

    Qt Creator caters not only to developers who are used to using the mouse,
    but also to developers who are more comfortable with the keyboard. A wide
    range of \l{keyboard-shortcuts}{keyboard} and
    \l{Searching With the Locator}{navigation} shortcuts are available to help
    speed up the process of developing your application.

*/

875

876
877
/*!
    \contentspage index.html
Leena Miettinen's avatar
Leena Miettinen committed
878
    \previouspage creator-remote-compiler.html
879
    \page creator-help.html
Leena Miettinen's avatar
Leena Miettinen committed
880
    \nextpage creator-advanced.html
881

882
    \title Getting Help
con's avatar
con committed
883

884
    Qt Creator comes fully integrated with Qt documentation and
885
    examples using the Qt Help plugin.
886

887
    \list
888
889
890
891
892
893
894
        \o To view documentation, switch to \gui Help mode.
        \o To obtain context sensitive help, move the text cursor to a Qt class
           or function and press \key F1. The documentation is displayed in a
           pane next to the code editor, or, if there is not enough vertical
           space, in the fullscreen \gui Help mode.
        \o To select and configure how the documentation is displayed in the
           \gui Help mode, select \gui Tools > \gui Options... > \gui Help.
895
896
    \endlist

897
898
899
900
901
902
903
904
905
    The following image displays the \gui Search pane in the \gui Help mode.

    \image qtcreator-help-search.png

    The following image displays the context sensitive help in the \gui Edit
    mode.

    \image qtcreator-context-sensitive-help.png

906
907
    \section1 Finding Information in Qt Documentation

908
    Qt Creator, \QSDK and other Qt deliverables contain documentation
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926