Newer
Older
\o To replace all occurrences in the file, click \gui{Replace All}.
\endlist
To search through projects, files on a file system or the currently open
file:
\list 1
\o Press \key Ctrl+Shift+F or select \gui Edit >
\gui Find/Replace > \gui{Advanced Find} >
\gui{Open Advanced Find...}.
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
\o Select the scope of your search:
\list
\o \gui{All Projects} searches files matching the defined file
pattern in all currently open projects.
For example, to search for \tt previewer only in \tt .cpp
and \tt .h files, enter in \gui{File pattern}
\tt *.cpp,*.h.
\image qtcreator-search-allprojects.png
\o \gui{Current Project} searches files matching the defined file
pattern only in the project you are currently editing.
\o \gui{Files on File System} recursively searches files matching
the defined file pattern in the selected directory.
\o \gui{Current File} searches only the current file.
\endlist
\o Enter the text you are looking for and click \gui Search.
\image qtcreator-searchresults.png
A list of files containing the searched text is displayed in the
\gui{Search Results} pane.
\list
\o To see all occurrences in a file, double-click the file name in
the list.
\o To go to an occurrence, double-click it.
\endlist
\endlist
*/
/*!
\contentspage index.html
\previouspage creator-editor-finding.html
\page creator-editor-refactoring.html
\nextpage creator-editor-locator.html
Code refactoring is the process of changing the code without modifying the
existing functionality of your application. By refactoring your code you
can:
\list
\o Improve internal quality of your application
\o Improve performance and extensibility
\o Improve code readability and maintainability
\o Simplify code structure
\endlist
To find the use of a specific symbol in your project:
\list 1
\o In the editor place the cursor on the symbol and select \gui Tools

Rohan Shetty
committed
> \gui C++ > \gui{Find Usages} or press
\key Ctrl+Shift+U.
Qt Creator looks for the symbol in the following locations:
\list
\o Files listed as a part of the project
\o Files directly used by the project files (for example, generated
files)
\o Header files of used frameworks and libraries
\endlist
\o The \gui{Search Results} pane opens and shows the location and
number of instances of the symbol in the current project.
\image qtcreator-refactoring-find.png
\endlist
You can browse the search results in the following ways:
\list
\o To go directly to an instance, double-click the instance in the
\gui{Search Results} pane.
\o To move between instances, click
\inlineimage qtcreator-forward.png
and
\inlineimage qtcreator-back.png
in the \gui{Search Results} pane.
\o To expand and collapse the list of all instances, click
\inlineimage qtcreator-expand.png
.
\o To clear the search results, click \inlineimage qtcreator-clear.png
.
\endlist

Leena Miettinen
committed
The functions used to rename symbols depends on whether you are
writing C++ or QML code. For QML, you can only rename IDs.
To rename a specific symbol in a Qt project:
\o In the editor, place the cursor on the symbol you would like to
change and select \gui Tools > \gui C++ >

Rohan Shetty
committed
\gui{Rename Symbol Under Cursor} or press \key Ctrl+Shift+R.
The \gui{Search Results} pane opens and shows the location and
number of instances of the symbol in the current project.
\image qtcreator-refactoring-replace.png
\o To replace all selected instances, enter the name of the new symbol
in the \gui{Replace with} text box and click \gui Replace.
To omit an instance, uncheck the check-box next to the instance.
\note This action replaces all selected instances of the symbol in
all files listed in the \gui{Search Results} pane. You cannot
undo this action.

Kavindra Palaraja
committed

Leena Miettinen
committed
\note Renaming local symbols does not open the \gui{Search Results} pane.
The instances of the symbol are highlighted in code and you can edit the
symbol. All instances of the local symbol are changed as you type.

Leena Miettinen
committed
To rename an ID in a Qt Quick project:
\list 1
\o Right-click an ID in the QML code and select
\gui {Rename id}.
\o In the \gui {Rename id} field, enter the new ID.
\endlist

Leena Miettinen
committed
*/

Kavindra Devi Palaraja
committed

Kavindra Palaraja
committed
/*!
\contentspage index.html
\previouspage creator-editor-locator.html
\page creator-project-managing.html
\nextpage creator-project-creating.html
\title Managing Projects

Leena Miettinen
committed
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 \l{Using Version Control Systems} {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 \l{Building for Multiple Targets} {build settings}

Leena Miettinen
committed
for each development platform. By default, \l{glossary-shadow-build}{shadow builds} are used to

Leena Miettinen
committed
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.2/qmake-tutorial.html#adding-platform-specific-source-files}{scopes}
to select the file to process depending on which platform qmake is run on.
Items such as open files, breakpoints, and watches are stored in
\l{Managing Sessions}{sessions}. They are not considered to be part of the
information shared across platforms.
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.
\o To use \bold{qmake} to build applications, open a \c .pro file. For more
\o To use \bold{CMake} to build applications you need to have CMake version
2.8.0 or later installed. For more information, see
\l{Setting Up a CMake Project}.
\o To use \bold{other build systems} to build applications, specify which files belong to

Leena Miettinen
committed
your project and which include directories or defines you want to pass
to your compiler. For more information, see
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
Qt Creator provides support for \l{Building and Running Applications}{building and running} Qt applications for
desktop environment and mobile devices. When you install the Nokia Qt SDK,
the build and run settings for the desktop, Maemo, and Symbian targets are set up
automatically. However, you need to install and configure some additional software
on the devices:
\list
\o \l{Setting Up Development Environment for Maemo}.
\o \l{Setting Up Development Environment for Symbian}.
\endlist
\note The only supported build system for mobile applications in Qt
Creator is qmake.
Once your mobile application is ready, you can test it in the Qt Simulator.
You can also connect Maemo and Symbian devices to your development PC and
debug applications on the devices. After you have tested the application,
you can deploy it on mobile devices.
Developing applications for mobile devices is different from developing
desktop applications. For more information, see
\l{Optimizing Applications for Mobile Devices}.
To change the location of the project directory, and to make changes in
the build and run settings, select \gui{Tools} > \gui{Options...} >
\gui{Projects} > \gui{General}.
Through external libraries Qt Creator can support code completion and
syntax highlighting for external libraries as if they were a part of the
current project or the Qt library.
The procedure of adding a library to a project depends on the type of
project, which influences the build system used.
\list
\o For information on adding external libraries to qmake projects, see
\l{Adding External Libraries to a qmake Project}.
\o For information on adding external libraries to CMake projects, see
\l{Adding External Libraries to a CMake Project}.
\endlist
*/
/*!
\contentspage index.html
\previouspage creator-project-managing.html
\page creator-project-creating.html
\nextpage creator-project-qmake.html
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
You use wizards to create and import several types of projects and files, such
as Qt GUI or console applications and Qt Quick applications. You can also use
wizards to add individual files to your projects. For example, you can create
the following types of files:
\list
\o Qt resource files, which allow you to store binary files in the
application executable
\o \QD forms and Qt QML files, which specify parts of application user
interfaces
\o C++ class, source, or header files
\endlist
The wizards prompt you to enter the settings needed
for that particular type of project and create the necessary files for you.
\image qtcreator-new-project.png
\section1 Using Project Wizards

Leena Miettinen
committed
\o Select \gui File > \gui{New File or Project} and select the type of your

Leena Miettinen
committed
The contents of the following dialogs depend on the project type.
Follow the instructions of the wizard.

Leena Miettinen
committed
This example uses \gui {Qt Gui Application}.
\o Name the project and set its path. To select the path from a

Leena Miettinen
committed
directory tree, click \gui Browse.
Avoid using spaces and special characters in the project name and
path.
\image qtcreator-intro-and-location.png
\o Specify the name of the class you want to create and using the
drop-down menu select its base class type.
Note that the \gui{Header file}, \gui{Source file} and
\gui{Form file} fields are automatically updated as you name your
class.
\image qtcreator-class-info.png
\o Review the project settings.

Leena Miettinen
committed
To create the project, click \gui Finish.
\image qtcreator-new-project-summary.png
\endlist
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
\section1 Adding New Project Wizards
If you have a team working on a large application or several applications,
you might want to standardize the way the team members create projects
and classes.
You can use the wizard templates in the \c {share/qtcreator/templates/wizards}
folder to create your own project and class wizards. Qt Creator looks in the
folder and adds all wizards defined in wizard.xml files to the \gui New dialog
that opens when you select \gui {File > New File or Project}.
In a project wizard, you can specify the files needed in a project.
You can add wizard pages to allow developers to specify settings for the
projcet.
In a class wizard, you can allow developers to specify the class name, base
class, and header and source files for the class.
To see how this works, rename wizard_example.xml as wizard.xml in the helloworld
and listmodels folders. After you restart Qt Creator, the \gui {Custom Classes}
and \gui {Custom Projects} categories appear in the \gui New dialog.
\image qtcreator-custom-project-wizards.png "The New dialog with custom projects and classes"
\section2 Creating Project Wizards
To create a project wizard:
\list 1
\o Make a copy of the \c {share/qtcreator/templates/wizards/helloworld} or
\c {share/qtcreator/templates/wizards/listmodel} folder.
\o Modify the wizard_example.xml file.
\o The following code determines the type of the wizard and its place
in the \gui New dialog:
\code
<wizard version="1" kind="project"
class="qt4project" firstpage="10"
id="A.HelloWorld" category="B.CustomProjects">
\endcode
\list
\o \c version is the version of the file contents. Do not modify this value.
\o \c kind specifies the type of the wizard: \c project or \c class.
\o \c class specifies the type of the project. Currently the only available
type is \c qt4project, which specifies a Qt console project.
\o \c firstpage specifies the place of the new page in the standard project
wizard. The value 10 ensures that the custom page appears after the standard
pages, as the last page of the wizard.
\o \c id is the unique identifier for your wizard. The letter specifies the
position of the wizard within the \c category. The HelloWorld wizard appears
as the first wizard in the second category in the \gui New dialog.
\o \c category is the category in which to place the wizard in the list.
The letter specifies the position of the category in the list in the \gui New
dialog.
\endlist
\o The following code specifies the icon and text that appear in the \gui New
dialog:
\code
<icon>console.png</icon>
<description>Creates a hello-world-project with custom message.</description>
<description xml:lang="de">Erzeugt ein Hello-Welt-Projekt mit einer Nachricht.</description>
<displayname>Hello World</displayname>;
<displayname xml:lang="de">Hallo Welt</displayname>;
<displaycategory>Custom Projects</displaycategory>
<displaycategory xml:lang="de">Benutzerdefinierte Projekte</displaycategory>
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
\endcode
\list
\o \c icon appears next to the \c displayName.
\o \c description appears at the bottom of the \gui New dialog when you
select the display name.
\o \c displayName appears in the \gui New dialog, under the
\c displayCategory.
You can add translations as values for the text elements. Specify the target
language as an attribute for the element. Use locale names (QLocale).
For example, \c {xml:lang="de"}.
\endlist
\o The following code specifies the files to add to the project:
\code
<files>
<file source="main.cpp" openeditor="true" />
<file source="project.pro" target="%ProjectName%.pro" openproject="true" />
\endcode
\list
\o \c source specifies the file to copy to the project. The files must be
located in the wizard folder.
\o \c target specifies the new filename for the file. The \c {%ProjectName%}
variable is replaced with the string that users specify in the \gui Name
field on the first page of the wizard.
\o \c openproject indicates that the file is a project file which is to be opened
after the wizard has finished.
\o \c openeditor indicates that the file is to be opened in an editor after
the wizard has finished.
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
\endlist
\o The following code creates a page that specifies settings for the project:
\code
<!-- Create a 2nd wizard page with parameters -->
<fieldpagetitle>Hello World Parameters</fieldpagetitle>
<fieldpagetitle xml:lang="de">Hallo Welt Parameter</fieldpagetitle>
<fields>
<field mandatory="true" name="MESSAGE">
<fieldcontrol class="QLineEdit" validator='^[^"]+$' defaulttext="Hello world!" />
<fielddescription>Hello world message:</fielddescription>
<fielddescription xml:lang="de">Hallo-Welt-Nachricht:</fielddescription>
</field>
</fields>
\endcode
\list
\o \c fieldpagetitle specifies the title of the page.
\o \c field specifies whether the field is mandatory (\c true or \c false).
You can use the value of the \c name field as a variable in other files (for
example, \c {%MESSAGE%}.
\o \c fieldcontrol specifies the field. \c class specifies the field type.
You can use interface objects from the QWidget class to create fields. This
example uses QLineEdit to create an input field.
\o \c validator specifies a regular expression to check the characters allowed in
the field.
\o \c defaulttext specifies text that appears in the field by default.
\o \c fielddescription specifies the field name that appears on the wizard page.
\endlist
\endlist
\section2 Creating Class Wizards
The widget.xml file for a class wizard is very similar to that for a project
wizard. The differences are discussed below.
To create a class wizard:
\list 1
\o The following code specifies settings for the wizard:
\code
<wizard version="1" kind="class" id="A.ListModel" category="B.CustomClasses">
<description>Creates a QAbstractListModel implementation.</description>
<description xml:lang="de">Erzeugt eine Implementierung von QAbstractListModel.</description>
<displayname>QAbstractListModel implementation</displayname>
<displayname xml:lang="de">Implementierung von QAbstractListModel</displayname>
<displaycategory>Custom Classes</displaycategory>
<displaycategory xml:lang="de">Benutzerdefinierte Klassen</displaycategory>
\endcode
For more information about the elements and their values, see
\l {Creating Project Wizards}.
\o The following code specifies the files to add to the project:
\code
<files>
<file source="listmodel.cpp" target="%ClassName:l%.%CppSourceSuffix%" openeditor="true" />
<file source="listmodel.h" target="%ClassName:l%.%CppHeaderSuffix%" openeditor="true" />
</files>
\endcode
Here, \c target contains the following variables that are used to construct
the filename:
\list
\o \c {%ClassName:l%} is replaced with the value of the \c ClassName field.
The modifier \c l converts the string to lower case, to observe Qt
conventions.
\o \c {%CppSourceSuffix%} is replaced by the default source suffix, which
is defined in Qt Creator in \gui {Tools > Options... > C++ > File Naming}.
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
For example, if users enter \bold MyClass, the filename becomes myclass.cpp
when the project is created.
\o \c {%CppHeaderSuffix%} is replaced by the default header suffix, which
is also defined in \gui {File Naming}. Here, the filename would
become myclass.h.
\endlist
\o The following code creates a page that allows users to select the class
name, base class, and header and source files for the class:
\code
<!-- Create parameter wizard page -->
<fieldpagetitle>ListModel parameters</fieldpagetitle>
<fieldpagetitle xml:lang="de">Parameter des ListModel</fieldpagetitle>
<fields>
<field name="ClassName">
<fieldcontrol class="QLineEdit" validator="^[a-zA-Z0-9_]+$" defaulttext="MyListModel" />
<fielddescription>Class name:</fielddescription>
<fielddescription xml:lang="de">Klassenname:</fielddescription>
</field>
<field name="Datatype">
<fieldcontrol class="QComboBox" combochoices="QString,int" defaultindex="0" />
<fielddescription>Data type:</fielddescription>
<fielddescription xml:lang="de">Datentyp:</fielddescription>
</field>
</fields>
\endcode
In addition to QLineEdit, QComboBox is used in the class wizard to create
a field. \c combochoices specifies the options in the combobox and
\c defaultindex specifies that QString is the default value.
\endlist
\previouspage creator-project-creating.html
\page creator-project-qmake.html
\nextpage creator-project-cmake.html

Leena Miettinen
committed
The qmake tool helps simplify the build process for development projects
across different platforms. qmake automates the generation of makefiles
so that only a few lines of information are needed to create each makefile.
qmake can be used for any software project, whether it is written in Qt or not.
The qmake tool generates a makefile based on the information in a project
file that is generated by Qt Creator. It can generate makefiles for MinGW,
Microsoft Visual studio, and CSL ARM in Windows, and GNU Compiler Collection
(GCC) in Linux and Mac OS X.
For more information about qmake, see the
\l{http://qt.nokia.com/doc/4.2/qmake-manual.html}{qmake Manual}.
\section1 Selecting the Qt Version
Qt Creator allows you to have multiple versions of Qt installed on
your development PC and use different versions for each of your projects.
If Qt Creator finds \bold qmake in the \c{PATH} environment variable, it uses
that version. The \l{glossary-system-qt}{ qmake version of Qt} is referred
to as \bold{Qt in PATH}. If you intend to use only one version of Qt and it
is already in the \c{PATH} and correctly set up for command line use, you do
not need to manually configure your Qt version.
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
\section2 Windows
To add a Qt version for \bold MinGW:
\list 1
\o Select \gui Tools > \gui Options... > \gui Qt4 >
\gui{Qt Versions}.
\o Click \inlineimage qtcreator-windows-add.png
and enter the name of the version in \gui{Version Name} field.
\o Enter the qmake binary path in the \gui{qmake Location}.
\o Enter the MinGW installation path in the \gui{MinGW Directory}.
\image qtcreator-qt4-qtversions-win-mingw.png
\endlist
To add a Qt version for a \bold{Microsoft Visual C++} compiler:
\list 1
\o Select \gui Tools > \gui Options... > \gui Qt4 >
\gui{Qt Versions}.
\o Qt Creator automatically sets the correct environment variables for
compilation. Select the internal version number of the installed
Microsoft Visual C++ tool chains using the \gui MSVC drop-down
box:
\list
\o \bold 7.1 for Visual Studio 2003
\o \bold 8.0 for Visual Studio 2005
\o \bold 9.0 for Visual Studio 2008
\endlist
\note If you are using the
\bold{Windows SDK for Windows Server 2008}, Qt Creator identifies
it as version 9.0.
\image qtcreator-qt4-qtversions-win-msvc.png
\endlist
If you are using \bold{Qt for Symbian} and your S60 SDK is registered
with devices.exe, Qt Creator automatically detects the Qt version. To add a
Qt for Symbian version:
\list 1
\o Select \gui Tools > \gui Options... > \gui Qt4 >
\gui{Qt Versions}.
\o Select the \gui{S60 SDK} you want the Qt Creator to use.
\image qtcreator-qt4-qtversions-win-symbian.png
\o To build an application for your device using GCCE, enter the path
to the \bold{CSL ARM Toolchain} directory in
\gui{CSL\\GCCE Directory}.
You do not need to specify this path if the compiler is included in
the \c{PATH} environment variable.
\o To build an application for the emulator (WINSCW toolchain), enter
the path to your Carbide C++ installation directory in
\gui{Carbide Directory}.
\note You need to have Carbide C++ version 2.0 or later installed.
\section2 Compiling Projects With Linux
To compile a project in Qt Creator, Linux uses GNU Compiler Collection
(GCC). Intel Compiler Collection (ICC) is supported as a drop-in
replacement for GCC.

Kavindra Devi Palaraja
committed
To add a Qt version:
\list 1
\o Select \gui Tools > \gui Options... > \gui Qt4 >
\gui{Qt Versions}.
\o Click \inlineimage qtcreator-linux-add.png
and enter the name of the version in \gui{Version Name}.
\o Enter the path to the qmake binary in \gui{Path to qmake}.
\endlist
\section2 Compiling Projects With Mac OS X
To compile a project in Qt Creator, Mac OS X uses GNU Compiler Collection
(GCC), which is part of Xcode.
To add a Qt version:
\list 1
\o Select \gui{Qt Creator} > \gui Preferences... > \gui{Qt Versions}.
\o Click \inlineimage qtcreator-macosx-add.png
and enter the name of the version in \gui{Version Name}.
\o Enter the path to the qmake binary in \gui{Path to qmake}.
\image qtcreator-qt4-qtversions.png
\endlist

Leena Miettinen
committed
\section1 Adding External Libraries to a qmake Project
Through external libraries Qt Creator can support code completion and
syntax highlighting as if they were part of the current project or the Qt
library.
To add an external library:
\list 1
\o Open your project file (.pro) using the \gui Projects pane.
\o Follow the instructions at \l{http://doc.trolltech.com/latest/qmake-project-files.html#declaring-other-libraries}
{Declaring other Libraries}.
\endlist
Syntax completion and highlighting work once your project successfully
builds and links against the external library.
*/
/*!
\contentspage index.html
\previouspage creator-developing-symbian.html
\page creator-building-running.html

Leena Miettinen
committed
\nextpage creator-building-targets.html
\title Building and Running Applications
Qt Creator provides support for building and running Qt applications for
desktop environment and mobile devices. When you install the Nokia Qt SDK,
the build and run settings for the desktop, Maemo, and Symbian targets are
set up automatically.
You can select the targets and click the \gui Run button to build and
run the applications on the targets.
To view and modify the settings for currently open projects, switch to the
\gui Projects mode by pressing \key Ctrl+4.
\image qtcreator-projectpane.png
The project pane consists of the following tabs:

Leena Miettinen
committed
\o \l{Building for Multiple Targets}{Targets}
\o \l{Specifying Editor Settings}{Editor Settings}
\o \l{Specifying Dependencies}{Dependencies}
Use the \gui Build and \gui Run buttons to switch between
the build and run settings for the active project.
If you have multiple projects open in Qt Creator, use
\gui{Select a Project} option at the top to navigate between different
project edits.

Leena Miettinen
committed
*/
/*!
\contentspage index.html
\previouspage creator-building-running.html
\page creator-building-targets.html
\nextpage creator-build-settings.html
\title Building for Multiple Targets
Different build configurations allow you to quickly switch between
different build settings. By default, Qt Creator creates \bold debug

Leena Miettinen
committed
\section1 Building for Desktop
\list 1
\o Select \gui Desktop as the target.
\o Click the \gui Run button.
\endlist

Leena Miettinen
committed
\section1 Building for 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.
\list 1
\o Select \gui {Qt Simulator} as the target.
\o Click the \gui Run button.
\endlist
For more information about using the Qt Simulator, see the
\l{http://doc.qt.nokia.com/qt-simulator-beta/index.html}{Qt Simulator Manual}.
\section1 Building for Maemo
\o Build and run the application for \l{Building for Qt Simulator}{Qt Simulator}.
\o Build and run the application for \l{Using the Maemo Emulator}{Maemo Emulator}.
\note The Maemo emulator support requires the Nokia Nokia N900 PR1.2 update.
\o If no problems are found, build and run the application for a device:
\list 1
\o Set up the MADDE development environment and specify a connection
to the device. For more information, see
\l{Setting Up Development Environment for Maemo}.
\o Connect the device to the development PC.
\o Click the \gui Run button.
\endlist
\endlist
Qt Creator uses the compiler specified in the MADDE toolchain to
build the application.
Qt Creator generates an installation package, installs in on the device,
and executes it. The application views are displayed on the Nokia N900.
Command-line
output is visible in the Qt Creator \gui {Application Output} view.
\section1 Building for Symbian
\list 1
\o Build and run the application for \l{Building for Qt Simulator}{Qt Simulator}.
\o If no problems are found, build and run the application for a device.
\o To test functionality that uses Symbian APIs, you can build and
run the application for Symbian Emulator.
\endlist
The build configuration for the \gui{Symbian Device} target
uses the GCCE tool chain by default. If you want to build
for the device using RVCT, select it in the \gui {Tool chain} field
in the \gui{General} section.

Leena Miettinen
committed
\section2 Building and Running for a Device
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
\list 1
\o Install the required software on the device. For more information, see
\l{Setting Up Development Environment for Symbian}.
\o Connect the device to the development PC through a USB cable.
Qt Creator shows the current connection state
of a device in its main toolbar, showing a red cross when no device is
connected, or a green check mark when a device is connected.
\image qtcreator-qt4-symbian-device-notconnected.png
\image qtcreator-qt4-symbian-device-connected.png
The tool tip of the target button shows more details about the actual
device that will be used when you run your application.
\o Start the \gui{App TRK} application on your device.
\o Click the \gui Run button.
\endlist
You can connect several devices to your development PC simultaneously.
In the details of the run configuration for the \gui{Symbian Device} target,
select the device to run your application on.
\section3 Creating Installation Packages
When you build the application for the \gui{Symbian Device} target, Qt
Creator automatically generates a Symbian installation system (SIS) file
in the project folder. You can deliver the installation file to users for
installation on Symbian devices.
Only installation files signed with a certificate and private key are
allowed to be installed onto Symbian devices. By default, Qt Creator
self-signs the installation file. This self-signing allows you to install
the application on a mobile device but places limits on what you can do
with the installation file, including:
\list
\o Self-signed applications cannot access the more sensitive
\l{Capabilities and Signing}{capabilities} of the mobile device.
\o Security warnings will be displayed when you install the self-signed
application on a mobile device.
\o Self-signed applications cannot be distributed commercially on Ovi
Store.
\endlist
To get around these limitations, you need to go through the Symbian Signed
process. The Symbian Signed organisation manages a public key
infrastructure to provide public authentication of the information in the
application signing certificates. Their security partner can validate your
certificate and give you a Publisher ID. Then, when you sign an
application, other people can be confident that the information in your
certificate is correct and that the application does actually come from you.
There are also options that do not require you to get a Publisher ID. For
more detail about how the Symbian Signed process works, see
\l{http://developer.symbian.org/wiki/index.php/Complete_Guide_To_Symbian_Signed}
{Complete Guide to Symbian Signed}.
When you have your own certificate and private key, you can specify them in
the \gui{Create sis Package} step in your build configuration.
\image qtcreator-qt4-symbian-signing.png
\section3 Capabilities and Signing
Capabilities allow the Symbian platform to control access by applications to
the functionality provided by the platform APIs. Access to capabilities is
determined by the device configuration and how the application has been signed.
Symbian Signed offers the following signing options depending on the
capabilities that the application accesses:
\list
\o \bold{Express signed} for applications that access only user and system
capabilities.
\o \bold{Certified signed} for applications that access also restricted or
device manufacturer capabilities.
\note You need to request the rights to access device manufacturer
capabilities from the manufacturer.
\endlist
For more information about how to choose the appropriate signing option, see
\l{http://developer.symbian.org/wiki/index.php/Symbian_Signed_For_Distributing_Your_Application}{Symbian Signed For Distributing Your Application}.
If you select a signing option that does not allow the application to access
the defined capabilities, installing the application on mobile devices
fails. To avoid problems, only define capabilities and link libraries to a project
if you really need them.
For more information about capabilities and how you can check which ones you
need, see
\l{http://developer.symbian.org/wiki/index.php/Capabilities_(Symbian_Signed)}{Capabilities (Symbian Signed)}
and
\l{http://doc.qt.nokia.com/4.7-snapshot/platform-notes-symbian.html#required-capabilities}{Required Capabilities for Qt Applications}.
For more information on how to define capabilities for a project, see
\l{http://doc.qt.nokia.com/4.7-snapshot/qmake-platform-notes.html#capabilities}{Capabilities}.

Leena Miettinen
committed
\section2 Building and Running for Symbian Emulator
Select
the \gui{Symbian Emulator} target as the active one, and build and run your
project.

Leena Miettinen
committed
\section2 Troubleshooting
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
If you cannot build the application, check if:
\list
\o You selected the Symbian Device target for building the application.
\o The settings for the Qt version you use to build your project are
correct. The path to the S60 SDK must point to the S60 SDK
installation directory. Select \gui Tools > \gui Options...
> \gui Debugger > \gui{Symbian TRK} and check if it points to the
debugger toolchain.
\endlist
If you cannot run the application on a device, check if:
\list
\o The device is connected through the USB cable in \e{PC Suite} mode.
\o \gui{App TRK} is running on the device, using the USB connection,
with the status \e connected.
\o The device is detected and selected in the run configuration
details.
\endlist
If you cannot run the application in the emulator, check if:
\list
\o You selected the \gui{Symbian Emulator} target for your application.
\o If the emulator process cannot be started, try closing Qt Creator and
starting the application directly from your file manager. Having
done this, Qt Creator should be able to run your projects in the
emulator.
\endlist
If this does not help to solve your problem, search the qt-creator@trolltech.com
mailing list archives or provide feedback to us via the methods described on the
\l{http://qt.gitorious.org/qt-creator/pages/Home}{Qt Creator Development Wiki}.

Leena Miettinen
committed
*/
/*!
\contentspage index.html
\previouspage creator-building-targets.html
\page creator-build-settings.html
\nextpage creator-run-settings.html
\title Specifying Build Settings
You specify build settings in the \gui Projects mode.

Leena Miettinen
committed
\image qtcreator-projectpane.png
To add a new build configuration, click \gui Add and select the type of
configuration you would like to add. You can add as many build