| 
									
										
										
										
											2009-11-24 17:27:59 +01:00
										 |  |  | // ********************************************************************** | 
					
						
							|  |  |  | // 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. | 
					
						
							|  |  |  | // ********************************************************************** | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage{index.html}{Qt Creator} | 
					
						
							|  |  |  |     \page index.html | 
					
						
							| 
									
										
										
										
											2008-12-16 13:58:26 +01:00
										 |  |  |     \nextpage creator-quick-tour.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Qt Creator Manual | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:10 +01:00
										 |  |  |     \section1 Version 1.3.1 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     The goal of Qt Creator is to provide a cross-platform, complete Integrated | 
					
						
							|  |  |  |     Development Environment (IDE) to develop Qt projects. It is available for | 
					
						
							|  |  |  |     the Linux, Mac OS X and Windows platforms. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-28 19:10:57 +02:00
										 |  |  |     \note Please report bugs and suggestions to the | 
					
						
							| 
									
										
										
										
											2009-10-28 14:36:28 +01:00
										 |  |  |     \l{http://bugreports.qt.nokia.com}{Qt Bug Tracker}. | 
					
						
							| 
									
										
										
										
											2009-08-28 19:10:57 +02:00
										 |  |  |     You can also join the Qt Creator mailing list. To subscribe, | 
					
						
							|  |  |  |     send a message with the word \e subscribe to | 
					
						
							|  |  |  |     \l{mailto:qt-creator-request@trolltech.com} | 
					
						
							|  |  |  |     {qt-creator-request@trolltech.com}. For more information on Qt mailing | 
					
						
							|  |  |  |     lists, visit \l{http://lists.trolltech.com}{http://lists.trolltech.com}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-31 16:16:37 +02:00
										 |  |  |     \raw HTML | 
					
						
							|  |  |  |     <img border="0" style="float:right;" src="images/qtcreator-screenshots.png" /> | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |     \endraw | 
					
						
							| 
									
										
										
										
											2009-08-31 16:16:37 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  |        \o   \l{A Quick Tour of Qt Creator} | 
					
						
							|  |  |  |        \o   \l{Creating a Project in Qt Creator} | 
					
						
							|  |  |  |        \o   \l{Writing a Simple Program with Qt Creator} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |        \o   \l{The Code Editor} | 
					
						
							|  |  |  |        \o   \l{Navigating Around Your Code with Locator} | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  |        \o   \l{Session Management in Qt Creator} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |        \o   \l{Qt Version Management} | 
					
						
							|  |  |  |        \o   \l{Project Settings} | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |        \o   \l{CMake Support in Qt Creator} | 
					
						
							|  |  |  |        \o   \l{Support for Generic Projects in Qt Creator} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |        \o   \l{External Libraries} | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |        \o   \l{Development of Qt for Symbian Based Applications} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |        \o   \l{Qt Creator and Debugging} | 
					
						
							|  |  |  |        \o   \l{Qt Creator and Version Control Systems} | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  |        \o   \l{Tips and Tricks} | 
					
						
							|  |  |  |        \o   \l{Keyboard Shortcuts} | 
					
						
							|  |  |  |        \o   \l{Glossary} | 
					
						
							|  |  |  |        \o   \l{Supported Platforms} | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  |        \o   \l{Known Issues} | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  |        \o   \l{Acknowledgements} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage index.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \page creator-quick-tour.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-creating-project.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 09:36:01 +01:00
										 |  |  |     \title A Quick Tour of Qt Creator | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     The labeled screenshot below shows some of the components of Qt Creator, in | 
					
						
							|  |  |  |     \gui Edit mode. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-breakdown.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 15:14:36 +01:00
										 |  |  |     \section1 The Mode Selectors | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     When working in Qt Creator, you can be in one of six modes: \bold Welcome, | 
					
						
							|  |  |  |     \bold Edit, \bold Debug, \bold Projects, \bold Help, and \bold Output. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Mode selectors allow you to quickly switch between tasks: editing, browsing | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     the Qt Creator manual, setting up the build environment, etc. You can | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     activate a mode by either clicking on its mode selector, or using the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \l{keyboard-shortcuts}{corresponding keyboard shortcut}. Certain actions also | 
					
						
							|  |  |  |     trigger a mode change, e.g., \gui{Debug}/\gui{Start debugging} switches | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     to the \gui Debug mode. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Welcome mode} - Displays a welcome screen allowing you to quickly | 
					
						
							|  |  |  |     load sessions or recent individual projects. This is the mode displayed | 
					
						
							|  |  |  |     when Qt Creator is run without command line switches. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Edit mode} - Lets you edit both project and source files. A sidebar | 
					
						
							|  |  |  |     on the left provides different views for navigating between files. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Debug mode} - Provides various ways to inspect the state of the | 
					
						
							|  |  |  |     program while debugging. See \l{Qt Creator and Debugging} for a hands-on | 
					
						
							| 
									
										
										
										
											2008-12-16 14:08:58 +01:00
										 |  |  |     description of how to use this mode. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Projects mode} - Lets you configure how projects can be built and | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     executed. Under the list of projects, there are tabs to configure the | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     build, run, and editor settings. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Help mode} - Shows all documentation registered by Qt Assistant, | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     such as the Qt library and Qt Creator documentation. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \o \gui{Output mode} - Lets you examine various data in detail, for example | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     build issues as well as compile and application output. This information | 
					
						
							|  |  |  |     is also available in the output panes. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 The Output Panes | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     The task pane in Qt Creator can display one of four different panes: | 
					
						
							|  |  |  |     \gui{Build Issues}, \gui{Search Results}, \gui{Application Output}, and | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |     \gui{Compile Output}. These panes are available in all modes. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     \section2 Build Issues | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-04 12:56:09 +02:00
										 |  |  |     The \gui{Build Issues} pane provides a list of issues, e.g., error messages | 
					
						
							|  |  |  |     or warnings that need to be fixed. It filters out irrelevant output from | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     the compiler and presents the issues in an organized way. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     \image qtcreator-build-issues.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \section2 Search Results | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     The \gui{Search Results} pane displays the results for global searches such | 
					
						
							|  |  |  |     as searching within a current document, files on disk, or all projects. In | 
					
						
							|  |  |  |     the screenshot below, we searched for all occurrences of \c{textfinder} | 
					
						
							|  |  |  |     within the \c{"/TextFinder"} folder. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-search-pane.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \section2 Application Output | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The \gui{Application Output} pane displays the status of a program when | 
					
						
							|  |  |  |     it is executed, and the debug output, e.g., output from qDebug(). | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-application-output.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Compile Output | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The \gui{Compile Output} pane provides all output from the compiler. In | 
					
						
							|  |  |  |     other words, it is a more detailed version of information displayed in the | 
					
						
							| 
									
										
										
										
											2008-12-11 11:20:25 +01:00
										 |  |  |     \gui{Build Issues} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-compile-pane.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 16:29:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \section1 Qt Help Integration | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator comes fully integrated with all of Qt's documentation and | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     examples via the Qt Help plugin. To view the documentation, switch | 
					
						
							|  |  |  |     to the \gui{Help} mode. To obtain context sensitive help, move the text | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     cursor to a Qt class or function and press \key{F1}. The documentation | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     is displayed in a pane on the right, as shown in the screenshot | 
					
						
							|  |  |  |     below. If there is enough vertical space, it is shown in the | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |     fullscreen help mode. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-context-sensitive-help.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     External documentation provided by the user can be used to augment or | 
					
						
							|  |  |  |     replace the documentation shipped with Qt Creator and Qt. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \section1 Qt Designer Integration | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator is fully integrated with Qt Designer to help you design user | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     interface forms like you would with the standalone version. The Qt | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     Designer integration also includes project management and code completion. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     For more information on Qt Designer, see | 
					
						
							| 
									
										
										
										
											2008-12-16 14:08:58 +01:00
										 |  |  |     \l{http://doc.trolltech.com/designer-manual.html}{The Designer Manual}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-formedit.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Keyboard Navigation | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-12 20:11:04 +01:00
										 |  |  |     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 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \l{Navigating Around Your Code with Locator}{navigation} shortcuts | 
					
						
							| 
									
										
										
										
											2008-12-12 20:11:04 +01:00
										 |  |  |     are available to help speed up the process of developing your application. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-writing-program.html | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  |     \page creator-code-editor.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-navigation.html | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title The Code Editor | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt Creator's code editor is designed to aid the developer in creating, editing, | 
					
						
							|  |  |  |     and navigating code. It is fully equipped with syntax highlighting, code | 
					
						
							|  |  |  |     completion, context sensitive help, and inline error indicators | 
					
						
							|  |  |  |     while you are typing. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Code Editor Configuration | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The screenshots below show the various dialogs within | 
					
						
							| 
									
										
										
										
											2009-02-04 15:57:02 +01:00
										 |  |  |     which you can configure your editor. | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-04 15:57:02 +01:00
										 |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage qtcreator-texteditor-fonts.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-02-26 17:02:15 +01:00
										 |  |  |             \i  \inlineimage qtcreator-texteditor-behavior.png | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage qtcreator-texteditor-display.png | 
					
						
							| 
									
										
										
										
											2009-01-16 15:35:49 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i  \inlineimage qtcreator-texteditor-completion.png | 
					
						
							| 
									
										
										
										
											2009-02-04 15:57:02 +01:00
										 |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-27 15:06:36 +02:00
										 |  |  |     \section1 Code Completion | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The completion popup shows possible completions to a certain statement. | 
					
						
							|  |  |  |     These completions include classes, namespaces, functions, variables, | 
					
						
							|  |  |  |     macros and keywords. Listed below are the icons used in the completion box | 
					
						
							|  |  |  |     and their meaning. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/class.png | 
					
						
							|  |  |  |             \i  A class | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/enum.png | 
					
						
							|  |  |  |             \i  An enum | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/enumerator.png | 
					
						
							|  |  |  |             \i  An enumerator (value of an enum) | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/func.png | 
					
						
							|  |  |  |             \i  A function | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/func_priv.png | 
					
						
							|  |  |  |             \i  A private function | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/func_prot.png | 
					
						
							|  |  |  |             \i  A protected function | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/var.png | 
					
						
							|  |  |  |             \i  A variable | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/var_priv.png | 
					
						
							|  |  |  |             \i  A private variable | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/var_prot.png | 
					
						
							|  |  |  |             \i  A protected variable | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/signal.png | 
					
						
							|  |  |  |             \i  A signal | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/slot.png | 
					
						
							|  |  |  |             \i  A slot | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/slot_priv.png | 
					
						
							|  |  |  |             \i  A private slot | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/slot_prot.png | 
					
						
							|  |  |  |             \i  A protected slot | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/keyword.png | 
					
						
							|  |  |  |             \i  A keyword | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/macro.png | 
					
						
							|  |  |  |             \i  A macro | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \inlineimage completion/namespace.png | 
					
						
							|  |  |  |             \i  A namespace | 
					
						
							|  |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \section1 External Editor | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     To switch to an external editor, select \gui{Open in external editor} from the | 
					
						
							|  |  |  |     \gui{Edit > Advanced} menu. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-version-management.html | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \page creator-project-pane.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-cmake-support.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \title Project Settings | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |             \i  \note This page describes Qt Creator's support for \c qmake. | 
					
						
							|  |  |  |                 For information on CMake support, see | 
					
						
							|  |  |  |                 \l{CMake Support in Qt Creator}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     To modify the project settings of your project, switch to the \gui{Projects} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     mode by using the mouse or pressing \key{Ctrl+4}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \image qtcreator-projectpane.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The project pane is divided into two areas. The currently active settings are | 
					
						
							|  |  |  |     displayed at the top. The active build and run configuration for all projects | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     can be changed there. The bottom area allows you to quickly get an overview | 
					
						
							|  |  |  |     of the build, run and editor settings as well as the dependencies between your | 
					
						
							|  |  |  |     projects. It also allows you to edit those settings. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \section1 Build Settings | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     Build configurations allow you to quickly switch between different build | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     settings. By default, Qt Creator creates a \bold{debug} and a | 
					
						
							|  |  |  |     \bold{release} build configuration. Both of these configurations use the | 
					
						
							|  |  |  |     \l{glossary-default-qt}{default Qt version}. Action items to create, clone, | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     or delete build configurations can be found at the top. You can have as | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     many build configurations as necessary. To edit settings, click on the | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \gui{Show Details} button. Here you can specify which | 
					
						
							|  |  |  |     \l{glossary-project-qt}{Qt version} to use to build your project, or whether | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     to \l{glossary-shadow-build}{shadow build} the project, for instance. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \image qtcreator-ppbuildsettings.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     The build system of Qt Creator is built on top of \c qmake and \c make. The | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     settings for \c qmake and \c make can be changed. Qt Creator runs the | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     make command using the correct Qt version. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     In the \bold{Build Environment} section you can specify the environment used | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     for building. By default, the environment in which Qt Creator was started | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     is used and modified to include the Qt version. Depending on the selected | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt version, Qt Creator automatically sets the necessary environment | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     variables. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \section1 Run Settings | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \image qtcreator-pprunsettings.png | 
					
						
							|  |  |  |     Qt Creator automatically creates run configurations for your project. | 
					
						
							|  |  |  |     These run configurations derive their executable | 
					
						
							|  |  |  |     from the parsed .pro files. You can also create \bold{custom executable} | 
					
						
							|  |  |  |     run configurations where you can freely set the executable to be run. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-16 17:36:17 +01:00
										 |  |  |     \section1 Dependencies | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     If you have multiple projects loaded in your session, you can configure | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     dependencies between them. This affects the build order of your | 
					
						
							|  |  |  |     projects. To do this: | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Select the project for which you want to configure the dependencies. | 
					
						
							|  |  |  |         \o Go to the \bold{Dependencies} section. | 
					
						
							|  |  |  |         \o Check the checkboxes to select other projects as dependencies. | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-11-02 14:16:57 +01:00
										 |  |  |     \note This is unrelated to the dependencies inside a qmake project. | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-session.html | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  |     \page creator-version-management.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-project-pane.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-14 16:02:50 +01:00
										 |  |  |     \title Qt Version Management | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator allows you to use multiple versions of Qt installed on your hard | 
					
						
							|  |  |  |     disk and switch between them easily. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator automatically detects if \c qmake is in the environment variable | 
					
						
							|  |  |  |     \c PATH. This \l{glossary-system-qt}{version of Qt} is referred to as | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \bold{Qt in PATH}. If you use only one version of Qt and it is | 
					
						
							|  |  |  |     already in your path and correctly set up for command line usage, you do | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     not need to manually configure your Qt version. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Otherwise, you can add your Qt version in | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{Tools > Options... > Qt Versions} on Windows and Linux or | 
					
						
							|  |  |  |     in \gui{Qt Creator > Preferences... > Qt Versions} on Mac OS X. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The detailed settings depend on your operating system and on the targeted | 
					
						
							|  |  |  |     tool chain. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \table | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i \image qtcreator-qt4-qtversions.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Linux and Mac OS X} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                On Linux and Mac OS X, set the \gui{path to QMake} | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                to the \c qmake binary of the Qt installation. If a Qt is | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                found in the \c PATH environment variable, it shows up | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                automatically as \gui{Qt in PATH}. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                On both platforms, the platform's GNU Compiler Collection (GCC) | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                is used to compile Qt. On Mac OS, the GCC compiler is part of XCode. | 
					
						
							|  |  |  |                On Linux, the Intel Compiler (ICC) is supported as a drop-in replacement | 
					
						
							|  |  |  |                for GCC. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i \image qtcreator-qt4-qtversions-win-mingw.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Windows and MinGW} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                If you are on the Windows platform and used MinGW | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                to compile Qt, you need to tell Qt Creator | 
					
						
							|  |  |  |                where MinGW is installed. This is done by setting the | 
					
						
							|  |  |  |                \gui{MinGW directory}. | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i \image qtcreator-qt4-qtversions-win-msvc.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Microsoft Visual C++} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                If your Qt version is compiled with Microsoft Visual C++'s | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                compiler, Qt Creator automatically sets the correct | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                environment variables for compilation. The \gui{MSVC} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                drop-down box indicates the internal version number of the | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                installed Microsoft Visual C++ tool chains: | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                \list | 
					
						
							|  |  |  |                    \o  \bold{7.1}: Visual Studio 2003 | 
					
						
							|  |  |  |                    \o  \bold{8.0}: Visual Studio 2005 | 
					
						
							|  |  |  |                    \o  \bold{9.0}: Visual Studio 2008 | 
					
						
							|  |  |  |                \endlist | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                If you are using the \c{Windows SDK for Windows Server 2008} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                instead of Visual Studio, it identifies as version 9.0. | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i \image qtcreator-qt4-qtversions-win-symbian.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Symbian} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |                If you are using Qt for Symbian and your S60 SDK is registered | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                with \c devices.exe, Qt Creator detects the Qt version | 
					
						
							|  |  |  |                automatically. | 
					
						
							|  |  |  |                It is shown in the \bold{Auto-detected} section in the options | 
					
						
							|  |  |  |                dialog. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                You can also manually add Qt for Symbian versions. In this case | 
					
						
							|  |  |  |                you need to tell Qt Creator the path to the S60 SDK | 
					
						
							|  |  |  |                it is supposed to use with these Qt installations. | 
					
						
							| 
									
										
										
										
											2009-11-12 18:42:08 +01:00
										 |  |  |                Add the path to your Carbide C++ install, version 2.0 | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                or later, if you want to build for the emulator | 
					
						
							|  |  |  |                (\c WINSCW tool chain). | 
					
						
							|  |  |  |                If you want to use \c GCCE to build for your device, | 
					
						
							|  |  |  |                you might need to add the path to the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                \c{CSL ARM Toolchain} directory (\gui{CSL/GCCE Directory}), | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                if the compiler is not found in the \c PATH environment | 
					
						
							|  |  |  |                variable. | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \endtable | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \note By default, projects are compiled with the | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \l{glossary-default-qt}{default Qt version}. You can override this in the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{build configuration}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-15 14:29:59 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-quick-tour.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \page creator-creating-project.html | 
					
						
							|  |  |  |     \nextpage creator-writing-program.html | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \title Creating a Project in Qt Creator | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |             \i \inlineimage qtcreator-new-project.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Creating a new project} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-16 08:53:01 +01:00
										 |  |  |         To create a new project, select \gui{New Project} from the \gui{File} menu. | 
					
						
							|  |  |  |         You can create one of the following three projects: | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-16 08:53:01 +01:00
										 |  |  |         \list | 
					
						
							|  |  |  |             \o Qt4 Console Application | 
					
						
							|  |  |  |             \o Qt4 Gui Application | 
					
						
							|  |  |  |             \o C++ Library | 
					
						
							|  |  |  |         \endlist | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         In this example, we select a \e{Qt4 Gui Application} and click on \gui{OK}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |             \i \inlineimage qtcreator-intro-and-location.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Setting the project name and location} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Next, we set the project's name and its path. Click on the \gui{Choose...} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         button to browse and select your path. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         Ideally, the path should not contain spaces or special characters. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |             \i \inlineimage qtcreator-select-modules.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Selecting the necessary Qt modules} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Check the check box for each Qt module you want to include into | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         your project. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Since we started a Qt4 Gui Application, the QtCore and QtGui modules are | 
					
						
							|  |  |  |         set by default, but you are free to add more. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |             \i \inlineimage qtcreator-class-info.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Specifying class information} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Specify the name of the class you want to create. The | 
					
						
							|  |  |  |         \e{Header file}, \e{Source file} and \e{Form file} fields update | 
					
						
							|  |  |  |         automatically according to the class name you choose. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Remember to select the base class for your class, either a | 
					
						
							|  |  |  |         QWidget, QDialog or QMainWindow, from the drop-down list. | 
					
						
							| 
									
										
										
										
											2008-12-16 12:24:03 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |             \i \inlineimage qtcreator-new-project-summary.png | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \i \bold{Creating the project} | 
					
						
							| 
									
										
										
										
											2008-12-16 12:24:03 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         Finally, review the files that will be created for you. To generate your project, | 
					
						
							|  |  |  |         click on \gui{Done}. | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-15 14:29:59 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-creating-project.html | 
					
						
							|  |  |  |     \page creator-writing-program.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-code-editor.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Writing a Simple Program with Qt Creator | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o \note This tutorial assumes that the user has experience in writing | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |            basic Qt applications, designing user interfaces with Qt Designer | 
					
						
							| 
									
										
										
										
											2009-03-27 15:04:12 +01:00
										 |  |  |            and using the Qt Resource System. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     In this example, we describe the steps involved in using Qt Creator | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     to create a small Qt program, Text Finder. Inspired by the QtUiTools' | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/uitools-textfinder.html}{Text Finder} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     example, we write a similar but simplified version of it, as shown | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     below. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-textfinder-screenshot.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Setting Up Your Environment | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Once you have installed Qt Creator, it detects automatically if Qt's | 
					
						
							|  |  |  |     location is in your \c PATH variable. If not, please follow the | 
					
						
							|  |  |  |     instructions in \l{Qt Version Management}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Setting Up the Project | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     We begin with a Qt4 Gui Application project generated by Qt Creator. The | 
					
						
							|  |  |  |     \l{Creating a Project in Qt Creator} document describes this process in | 
					
						
							| 
									
										
										
										
											2009-01-12 12:38:54 +01:00
										 |  |  |     detail. Remember to select QWidget as the Text Finder's base class. If | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     your project is not yet loaded, load it by selecting \gui{File} > \gui{Open}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     In your project, you have the following files: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o \c{textfinder.h} | 
					
						
							|  |  |  |         \o \c{textfinder.cpp} | 
					
						
							|  |  |  |         \o \c{main.cpp} | 
					
						
							|  |  |  |         \o \c{textfinder.ui} | 
					
						
							|  |  |  |         \o \c{textfinder.pro} | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The \c{.h} and \c{.cpp} files come with the necessary boiler plate code. | 
					
						
							|  |  |  |     The \c{.pro} file is also complete. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Filling in the Missing Pieces | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     We begin by designing the user interface and then move on to filling | 
					
						
							|  |  |  |     in the missing code. Finally, we add the find functionality. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 The User Interface | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     To begin designing the user interface, double-click on the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \c{textfinder.ui} file in the \gui{Project Explorer}. This launches the | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     integrated Qt Designer. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Design the form below with: | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o \l{http://doc.trolltech.com/qlabel.html}{QLabel} | 
					
						
							|  |  |  |         \o \l{http://doc.trolltech.com/qlinedit.html}{QLineEdit} (named lineEdit) | 
					
						
							|  |  |  |         \o \l{http://doc.trolltech.com/qpushbutton.html}{QPushButton} (named findButton) | 
					
						
							|  |  |  |         \o \l{http://doc.trolltech.com/qtextedit.html}{QTextEdit} (named textEdit) | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \image qtcreator-textfinder-ui.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     We recommend that you use a \l{http://doc.trolltech.com/qgridlayout.html}{QGridLayout} | 
					
						
							|  |  |  |     to lay out the label, the line edit and the push button. | 
					
						
							|  |  |  |     The grid layout and the text edit can then be added to a | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/qvboxlayout.html}{QVBoxLayout}. | 
					
						
							|  |  |  |     If you are new to designing forms with \QD, see the | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/designer-manual.html}{Qt Designer Manual}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \section2 The Header File | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The \c{textfinder.h} file already has the necessary #includes, a | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     constructor, a destructor, and the \c{Ui} object. We need to add a private | 
					
						
							|  |  |  |     slot, \c{on_findButton_clicked()}, to carry out our find operation. We | 
					
						
							|  |  |  |     also need a private function, \c{loadTextFile()}, to read and display the | 
					
						
							| 
									
										
										
										
											2008-12-16 14:08:58 +01:00
										 |  |  |     contents of our input text file in the | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/qtextedit.html}{QTextEdit}. This is done with | 
					
						
							|  |  |  |     the following code: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-02 13:33:40 +02:00
										 |  |  |     \snippet examples/textfinder/textfinder.h 0 | 
					
						
							| 
									
										
										
										
											2009-04-02 14:45:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |     \note The \c{Ui::TextFinder} object is already provided. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \section2 The Source File | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Now that our header file is complete we move on to our source file, | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \c{textfinder.cpp}. We begin by filling in the functionality to load a | 
					
						
							|  |  |  |     text file. This is described in the code snippet below: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-02 13:33:40 +02:00
										 |  |  |     \snippet examples/textfinder/textfinder.cpp 0 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-16 14:08:58 +01:00
										 |  |  |     Basically, we load a text file using | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/qfile.html}{QFile}, read it with | 
					
						
							|  |  |  |     \l{http://doc.trolltech.com/qtextstream.html}{QTextStream}, and | 
					
						
							|  |  |  |     then display it on \c{textEdit} with | 
					
						
							| 
									
										
										
										
											2009-03-24 17:19:24 +01:00
										 |  |  |     \l{http://doc.trolltech.com/qtextedit.html#plainText-prop}{setPlainText()} | 
					
						
							|  |  |  |     which requires adding the following additional #includes to textfinder.cpp: | 
					
						
							| 
									
										
										
										
											2009-04-02 13:33:40 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \snippet examples/textfinder/textfinder.cpp 1 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     For the \c{on_findButton_clicked()} slot, we extract the search string and | 
					
						
							| 
									
										
										
										
											2008-12-16 14:08:58 +01:00
										 |  |  |     use the \l{http://doc.trolltech.com/qtextedit.html#find}{find()} function | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     to look for the search string within the text file. This is described in | 
					
						
							|  |  |  |     the code snippet below: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-02 13:33:40 +02:00
										 |  |  |     \snippet examples/textfinder/textfinder.cpp 2 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Once we have both of these functions complete, we call \c{loadTextFile()} in | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     our constructor. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-02 13:33:40 +02:00
										 |  |  |     \snippet examples/textfinder/textfinder.cpp 3 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The \c{on_findButton_clicked()} slot is called automatically in | 
					
						
							|  |  |  |     the uic generated \c{ui_textfinder.h} file by this line of code: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \code | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |     QMetaObject::connectSlotsByName(TextFinder); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endcode | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 The Resource File | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     We require a resource file (\c{.qrc}) within which we embed the input | 
					
						
							|  |  |  |     text file. This can be any \c{.txt} file with a paragraph of text. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     To add a resource file: | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Right-click on \gui{Resource Files} in the \gui{Project Explorer}. | 
					
						
							|  |  |  |         \o Select \gui{Add New File...}. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  |     The wizard dialog below is displayed. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-add-resource-wizard.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \list 3 | 
					
						
							|  |  |  |         \o Enter "textfinder" in the \gui{Name} field. Use the given \gui{Path}. | 
					
						
							|  |  |  |         \o Click on \gui{Continue}. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  |     This page is displayed: | 
					
						
							| 
									
										
										
										
											2008-12-16 14:48:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-add-resource-wizard2.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \list 5 | 
					
						
							|  |  |  |         \o Choose to which project you want to add the new file. Select "TextFinder" | 
					
						
							|  |  |  |         as the \gui{Project}. | 
					
						
							|  |  |  |         \o Make sure that \gui{Add to Project} is checked. | 
					
						
							|  |  |  |         \o Click on \gui{Done}. | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Your resource file is now displayed in the resource editor. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \list 8 | 
					
						
							|  |  |  |         \o Select \gui{Add} > \gui{Add Prefix} from the drop-down list. The prefix we | 
					
						
							|  |  |  |         require is a slash (\c{/}). | 
					
						
							|  |  |  |         \o Select \gui{Add} > \gui{Add File} from the drop-down list. | 
					
						
							|  |  |  |         \o Locate the text file you are going to use. We use \c{input.txt}. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Once the resource file has been successfully added, the following is displayed: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \image qtcreator-add-resource.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Compiling and Running your Program | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Now that you have all the necessary files, click the \inlineimage qtcreator-run.png | 
					
						
							|  |  |  |     button to compile your program. | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-debugging.html | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  |     \page creator-version-control.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-tips.html | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Qt Creator and Version Control Systems | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \caption    Version control systems supported by Qt Creator | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \bold{git} | 
					
						
							|  |  |  |             \i  \l{http://git-scm.com/} | 
					
						
							| 
									
										
										
										
											2009-06-08 12:51:29 +02:00
										 |  |  |             \i | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i  \bold{Subversion} | 
					
						
							|  |  |  |             \i  \l{http://subversion.tigris.org/} | 
					
						
							| 
									
										
										
										
											2009-06-08 12:51:29 +02:00
										 |  |  |             \i | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i  \bold{Perforce} | 
					
						
							|  |  |  |             \i  \l{http://www.perforce.com} | 
					
						
							| 
									
										
										
										
											2009-06-08 12:51:29 +02:00
										 |  |  |             \i  Server version 2006.1 and later | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i  \bold{CVS} | 
					
						
							|  |  |  |             \i  \l{http://www.cvshome.org} | 
					
						
							|  |  |  |             \i | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Setting Up Version Control Systems | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator uses the version control system's command line clients to | 
					
						
							|  |  |  |     access your repositories. To set it up, you must ensure that these command | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     line clients can be located via the \c{PATH} environment variable. | 
					
						
							|  |  |  |     To specify the path to the command line client's executable, go to the settings | 
					
						
							|  |  |  |     pages in \gui{Tools} > \gui{Options...}. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Setting Up Common Options | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The \gui{Version Control > Common} settings page features common settings for | 
					
						
							|  |  |  |     version control systems, such as commit message line wrapping and checking | 
					
						
							|  |  |  |     options. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \gui{Submit message checking script} is a script or program that can be | 
					
						
							|  |  |  |     used to perform checks on the submit message before submitting. The submit | 
					
						
							|  |  |  |     message is passed in as the script's first parameter. If there is an error, | 
					
						
							|  |  |  |     the script should output a message on standard error and return a non-zero | 
					
						
							|  |  |  |     exit code. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \gui{User/alias configuration file} takes a file in mailmap format that | 
					
						
							|  |  |  |     lists user names and aliases. For example: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \code | 
					
						
							|  |  |  |     Jon Doe <Jon.Doe@company.com> | 
					
						
							|  |  |  |     Hans Mustermann <Hans.Mustermann@company.com> hm <info@company.com> | 
					
						
							|  |  |  |     \endcode | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Notice that the second line specifies the alias \e{hm} and the | 
					
						
							|  |  |  |     corresponding email address for \e{Hans Mustermann}. If the user/alias | 
					
						
							|  |  |  |     configuration file is present, the submit editor displays a context | 
					
						
							|  |  |  |     menu with \gui{Insert name...} that pops up a dialog letting the user | 
					
						
							|  |  |  |     select a name. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \gui{User field configuration file} is a simple text file consisting of | 
					
						
							|  |  |  |     lines specifying submit message fields that take user names, for example: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \code | 
					
						
							|  |  |  |     Reviewed-by: | 
					
						
							|  |  |  |     Signed-off-by: | 
					
						
							|  |  |  |     \endcode | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     These fields appear below the submit message. They provide completion | 
					
						
							|  |  |  |     for the aliases/public user names specified in the | 
					
						
							|  |  |  |     \e{User/alias configuration file} as well as a button that opens the | 
					
						
							|  |  |  |     aforementioned user name dialog. | 
					
						
							| 
									
										
										
										
											2009-01-15 13:07:25 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Using Version Control Systems | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The version control sub-menus are in \gui{Tools} menu. The version control system | 
					
						
							|  |  |  |     managing the current project is displayed here. | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Each version control system adds a pane to the \gui{Application Output} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     panes within which itlogs the commands it executes, prepended by a | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  |     timestamp and the relevant output. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-vcs-pane.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Addings Files | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     When you create a new file or a new project, the wizard displays a page | 
					
						
							|  |  |  |     asking whether the files should be added to a version control system. | 
					
						
							|  |  |  |     This happens when the parent directory or the project is already | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  |     under version control and the system supports the concept of adding files, | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     e.g., \bold{Perforce} and \bold{Subversion}. Alternatively, you can | 
					
						
							|  |  |  |     add files later by using the version control tool menus. | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     With \bold{git}, there is no concept of adding files. Instead, all modified | 
					
						
							|  |  |  |     files must be \e{staged} for a commit. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Viewing Diff Output | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     All version control systems provide menu options to \e{diff} the current | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     file or project: to compare it with the latest version stored in the | 
					
						
							|  |  |  |     repository and to display the differences. In Qt Creator, a diff is | 
					
						
							|  |  |  |     displayed in a read-only editor. If the file is accessible, you can | 
					
						
							|  |  |  |     double-click on a selected diff chunk and Qt Creator opens an editor | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  |     displaying the file, scrolled to the line in question. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-vcs-diff.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  |     \section2 Annotating Files | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Annotation views are obtained by selecting \gui{Annotate} or \gui{Blame}. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     This displays the lines of the file prepended by the change identifier | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  |     they originate from. Clicking on the change identifier shows a detailed | 
					
						
							|  |  |  |     description of the file. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Committing Changes | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Once you have finished making changes, you can submit them to the version | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     control system by choosing \gui{Commit} or \gui{Submit}. Qt Creator | 
					
						
							|  |  |  |     displays a commit page containing a text editor, where you can enter your | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  |     commit message, and a checkable list of modified files to be included. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     When you are done, click on \gui{Commit} to start committing. In addition, | 
					
						
							|  |  |  |     there is a \gui{Diff Selected Files} button that brings up a diff view of the | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  |     files selected in the file list. Since the commit page is just another | 
					
						
							|  |  |  |     editor, you can go back to it by closing the diff view. Alternatively, you | 
					
						
							|  |  |  |     can view it from the editor combo box showing the \gui{Opened files}. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-vcs-commit.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Viewing Versioning History and Change Details | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The versioning history of a file is displayed by selecting | 
					
						
							|  |  |  |     \gui{Log} (for \bold{git}) or \gui{Filelog} (for \bold{Perforce} and | 
					
						
							|  |  |  |     \bold{Subversion}). Typically, the log output contains the | 
					
						
							|  |  |  |     date, the commit message, and a change or revision identifier. | 
					
						
							|  |  |  |     Click on the identifier to display a description of the change including the diff. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-vcs-log.png | 
					
						
							|  |  |  |     \image qtcreator-vcs-describe.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Using git-specific Menu Entries | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     The git sub-menu contains additional entries: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  \gui{Stash} | 
					
						
							|  |  |  |             \i  Stash local changes prior to executing a \bold{pull}. | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-01-15 15:57:07 +01:00
										 |  |  |             \i  \gui{Pull} | 
					
						
							|  |  |  |             \i  Pull changes from the remote repository. If there are locally | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                 modified files, you are prompted to stash those changes. | 
					
						
							| 
									
										
										
										
											2009-01-15 15:57:07 +01:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i  \gui{Branches...} | 
					
						
							|  |  |  |             \i  Displays the branch dialog showing the local branches at the | 
					
						
							|  |  |  |                 top and remote branches at the bottom. To switch to the local | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                 branch, double-click on it. Double-clicking on a remote | 
					
						
							|  |  |  |                 branch first creates a local branch with the same name that | 
					
						
							|  |  |  |                 tracks the remote branch, and then switches to it. | 
					
						
							| 
									
										
										
										
											2009-01-15 15:57:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 \image qtcreator-vcs-gitbranch.png | 
					
						
							| 
									
										
										
										
											2009-01-15 14:30:18 +01:00
										 |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2009-01-15 13:50:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-26 13:39:41 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-code-editor.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \page creator-navigation.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-session.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \title Navigating Around Your Code with Locator | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     With Qt Creator, navigating to different locations in your project or on | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     your disk, e.g., files, classes, methods, etc., is simple using | 
					
						
							|  |  |  |     \gui Locator -- a smart line edit at the bottom left in Qt Creator | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     window. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-locator.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     For example, to open your project's \c{main.cpp} file: | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Click on \gui Locator or press \key{Ctrl+K} (Mac OS X: \key{Cmd+K}). | 
					
						
							|  |  |  |         \o Type in the file name. | 
					
						
							|  |  |  |         \o Press \key Return. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  |     The file opens in the editor. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |     You can also type part of a file name and use the wildcard characters | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |     \c{*} and \c{?} to match \e{any} number of \e{any} characters. A list | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     of files matching your criteria is displayed. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui Locator allows you to navigate files both on disk and in other | 
					
						
							|  |  |  |     "locations", which are organized with \bold{Filters}. There are | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     filters for: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o  Files anywhere on your hard disk (browsing through the file system) | 
					
						
							|  |  |  |         \o  Files from a subdirectory structure defined by you | 
					
						
							|  |  |  |         \o  Files mentioned in your \c{.pro} files, such as source, header | 
					
						
							|  |  |  |             resource, and \c{.ui} files | 
					
						
							|  |  |  |         \o  Any open document | 
					
						
							|  |  |  |         \o  Class and method definitions in your project or anywhere referenced | 
					
						
							|  |  |  |             from your project | 
					
						
							|  |  |  |         \o  Help topics, including Qt's documentation | 
					
						
							|  |  |  |         \o  Specific line in the document displayed on your editor | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Some of these filters require you to activate them by typing an assigned | 
					
						
							|  |  |  |     \e prefix. This prefix is usually a single character followed by | 
					
						
							|  |  |  |     \key{Space}. For example, to jump to the definition of the class | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \l{http://doc.trolltech.com/qdatastream.html}{QDataStream}, activate | 
					
						
							|  |  |  |     \gui Locator. Then type a colon (\key{:}) followed by a \key{Space} and | 
					
						
							|  |  |  |     the class name. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Below is a full list of \l{http://doc.trolltech.com/qdatastream.html} | 
					
						
							|  |  |  |     {QDataStream} related output: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-navigate-popup.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Filters can be added to provide quick navigation around files in a | 
					
						
							|  |  |  |     subdirectory structure defined by you. This way, you can acccess files you | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     need that are not directly mentioned in your project. | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Click the button \image qtcreator-locator-magnify.png | 
					
						
							|  |  |  |         \o Select \gui{Configure...} from the menu displayed: | 
					
						
							|  |  |  |         \image qtcreator-locator-customize.png | 
					
						
							|  |  |  |         \o To create a new filter, select \gui Add from the \gui Configure... | 
					
						
							|  |  |  |         dialog (\gui Options on Mac Os X). | 
					
						
							|  |  |  |         \o In the \gui{Filter Configuration} dialog below: | 
					
						
							|  |  |  |         \list | 
					
						
							|  |  |  |             \o Give your filter a name. | 
					
						
							|  |  |  |             \o Select your preferred directories. | 
					
						
							|  |  |  |             \o Set file patterns with a comma separated list. | 
					
						
							|  |  |  |             \o Specify a prefix string. | 
					
						
							|  |  |  |         \endlist | 
					
						
							|  |  |  |         \image qtcreator-navigate-customfilter.png | 
					
						
							|  |  |  |         \o Close the dialog. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  |     \gui Locator searches the directories you selected for files matching | 
					
						
							|  |  |  |     your file patterns. Information is cached. To update the cached information: | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Click the button \image qtcreator-locator-magnify.png again. | 
					
						
							|  |  |  |         \o Select \gui Refresh. | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The following table lists available filters: | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \header | 
					
						
							|  |  |  |             \o  Function | 
					
						
							|  |  |  |             \o  Key Combination | 
					
						
							|  |  |  |             \o  Screenshot | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a line in the current document. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  Ctrl+K, l, Space, and the line number | 
					
						
							|  |  |  |             \o  \image qtcreator-locator-line.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a symbol definition. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  Ctrl+K, :, Space, and the function name | 
					
						
							|  |  |  |             \o  \image qtcreator-locator-symbols.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a help topic. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  Ctrl+K, ?, Space, and the topic | 
					
						
							|  |  |  |             \o  \image qtcreator-locator-help.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to an opened document. | 
					
						
							|  |  |  |             \o  Ctrl+K, o, Space, and the document name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-opendocs.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a file in the file system (browse the file system). | 
					
						
							|  |  |  |             \o  Ctrl+K, f, Space, and the file name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-filesystem.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a file in any project currently loaded. | 
					
						
							|  |  |  |             \o  Ctrl+K, a, Space, and the function name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-files.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a file in the current project. | 
					
						
							|  |  |  |             \o  Ctrl+K, p, Space, and the function name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-current-project.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a class definition. | 
					
						
							|  |  |  |             \o  Ctrl+K, c, Space, and the class name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-classes.png | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  Go to a method definition. | 
					
						
							|  |  |  |             \o  Ctrl+K, m, Space, and the class name | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |             \o  \image qtcreator-locator-methods.png | 
					
						
							|  |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \note By default, if you press \key{Ctrl+K} and do not use a prefix to | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     specify a filter, three filters are enabled: \c{o}, \c{l}, and \c{a}. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \note On Mac OS X, press \key{Cmd+K} instead of \key{Ctrl+K}. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-navigation.html | 
					
						
							|  |  |  |     \page creator-session.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-version-management.html | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Session Management in Qt Creator | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     In Qt Creator, a session is a collection of: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o Open projects with their dependencies | 
					
						
							|  |  |  |         \o Open editors | 
					
						
							|  |  |  |         \o Breakpoints and watches | 
					
						
							|  |  |  |         \o Bookmarks | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     When you run Qt Creator, you enter a default session. You can create a new | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  |     session using the \gui{Session Manager...} option, available in the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{File > Session} menu. | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-session-manager.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     To switch between sessions, select \gui{File > Session}. If you do not | 
					
						
							|  |  |  |     create and select any session, Qt Creator always uses the default | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  |     session. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-session-menu.png | 
					
						
							| 
									
										
										
										
											2009-08-04 12:56:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     When you launch Qt Creator, a list of your sessions is | 
					
						
							|  |  |  |     displayed on the \gui{Welcome screen}. | 
					
						
							| 
									
										
										
										
											2009-08-04 12:56:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-welcome-session.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-27 15:06:43 +02:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-qt-for-symbian.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \page creator-debugging.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-version-control.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \title Qt Creator and Debugging | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 About Debugging with Qt Creator | 
					
						
							| 
									
										
										
										
											2009-04-08 16:34:42 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator does not have its own debugger. Instead, it provides a graphical | 
					
						
							|  |  |  |     frontend to various debugger engines: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							| 
									
										
										
										
											2009-04-08 16:34:42 +02:00
										 |  |  |         \header | 
					
						
							|  |  |  |             \o Platform | 
					
						
							|  |  |  |             \o Compiler | 
					
						
							|  |  |  |             \o Debugger Engine | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |             \o Linux, Unixes, Mac OS | 
					
						
							|  |  |  |             \o gcc | 
					
						
							|  |  |  |             \o GNU Symbolic Debugger (gdb) | 
					
						
							| 
									
										
										
										
											2009-04-08 16:34:42 +02:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |             \o Windows/MinGW | 
					
						
							|  |  |  |             \o gcc | 
					
						
							|  |  |  |             \o GNU Symbolic Debugger (gdb) | 
					
						
							| 
									
										
										
										
											2009-04-08 16:34:42 +02:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |             \o Windows | 
					
						
							|  |  |  |             \o Microsoft Visual C++ Compiler | 
					
						
							|  |  |  |             \o Debugging Tools for Windows/Microsoft Console Debugger (CDB) | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The frontend allows you to: | 
					
						
							|  |  |  |     \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, local and global variables, etc. | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt Creator displays the raw information provided by the engine | 
					
						
							|  |  |  |     in a clear and concise manner. This simplifies the debugging process. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt Creator comes with generic IDE functionality: stack view, views for locals and | 
					
						
							|  |  |  |     watchers, registers, etc. In addition, Qt Creator includes features to make | 
					
						
							|  |  |  |     debugging Qt-based applications easy. The debugger frontend understands the | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     internal layout of several Qt classes such as QString, the QTL containers, | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |     and most importantly QObject (and classes derived from it), as well as | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     most containers of the C++ Standard Library. Therefore, the debugger can | 
					
						
							| 
									
										
										
										
											2009-11-06 10:46:24 +01:00
										 |  |  |     present their contents in a useful way. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |     \section1 Debugger Engine Installation Notes | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \header | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o Debugger engine | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |             \o Notes | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \o Gdb | 
					
						
							| 
									
										
										
										
											2009-12-11 16:30:26 +01:00
										 |  |  |             \o Requires gdb version 6.8 on Linux. On Mac OS X, please install the latest available Xcode | 
					
						
							|  |  |  |                available for your OS version. | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o Debugging tools for Windows | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |             \o Using this engine requires you to install the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                \e{Debugging tools for Windows} | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  |                \l{http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx}{32-bit} | 
					
						
							|  |  |  |                or | 
					
						
							|  |  |  |                \l{http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx}{64-bit} | 
					
						
							| 
									
										
										
										
											2009-10-06 15:50:48 +02:00
										 |  |  |                package (Version 6.11.1.404 for the 32-bit or the 64-bit version of Qt Creator, respectively), | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |                which is freely available for download from the | 
					
						
							|  |  |  |                \l{http://msdn.microsoft.com/en-us/default.aspx} | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  |                {Microsoft Developer Network}. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                The pre-built \e{Qt SDK for Windows} makes use | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |                of the library if it is present on the system. When building Qt | 
					
						
							|  |  |  |                Creator using the Microsoft Visual C++ Compiler, the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                \c{"%ProgramFiles%\Debugging Tools for Windows"} path is | 
					
						
							| 
									
										
										
										
											2009-04-15 16:34:23 +02:00
										 |  |  |                checked to ensure that all required header files are there. | 
					
						
							|  |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Interaction with the Debugger | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     In \gui Debug mode, several dock widgets are used to interact with the | 
					
						
							|  |  |  |     program you are debugging. The frequently used dock widgets are visible by | 
					
						
							|  |  |  |     default; the rarely used ones are hidden. To change the default settings, | 
					
						
							|  |  |  |     select \gui Debug and then select \gui View. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-16 18:39:10 +01:00
										 |  |  |     \image qtcreator-debug-view.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Here, you can lock or unlock the location of your views as well as display | 
					
						
							|  |  |  |     or hide them. Among the views you can display are \gui Breakpoints, | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui Stack, \gui Thread, \gui Modules, \gui Registers, \gui Disassembler, | 
					
						
							|  |  |  |     and \gui Debugger. The position of your dock widgets is saved for future | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     sessions. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Usage of the Debugger | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     To start a program under the debugger's control, select the \gui{Debug} | 
					
						
							|  |  |  |     menu and \gui{Start Debugging}, or press \key{F5}. Qt Creator | 
					
						
							|  |  |  |     checks whether the compiled program is up-to-date, rebuilding it if | 
					
						
							|  |  |  |     necessary. The debugger then takes over and starts the program. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \note Starting a program in the debugger can take a considerable amount of | 
					
						
							|  |  |  |     time, typically in the range of several seconds to minutes if complex | 
					
						
							|  |  |  |     features (like QtWebKit) are used. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Once the program starts running, it behaves and performs as usual. | 
					
						
							|  |  |  |     The user can interrupt a running program by selecting | 
					
						
							|  |  |  |     \gui {Interrupt} from the \gui{Debug} menu. The program is automatically | 
					
						
							|  |  |  |     interrupted as soon as a breakpoint is hit. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Once the program stops, Qt Creator: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o Retrieves data representing the call stack at the program's current | 
					
						
							|  |  |  |            position. | 
					
						
							|  |  |  |         \o Retrieves the contents of local variables. | 
					
						
							|  |  |  |         \o Examines \gui Watchers. | 
					
						
							|  |  |  |         \o Updates the \gui Registers, \gui Modules, and \gui Disassembler | 
					
						
							|  |  |  |            views. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     You can use the debugger views to examine the data in more detail. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     To finish debugging, press \key{Shift+F5}. A line of code can be executed | 
					
						
							|  |  |  |     as a whole with \key F10; to step into a function or a sub-function, use | 
					
						
							|  |  |  |     \key F11. Alternatively, you can continue running the program with \key F5. | 
					
						
							|  |  |  |     It is also possible to continue executing the program until the current | 
					
						
							|  |  |  |     function completes or jump to an arbitrary position in the current | 
					
						
							|  |  |  |     function. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \section2 Breakpoints | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Breakpoints are shown in the \gui{Breakpoints} view which is enabled | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     by default. This view is also accessible when the debugger and the program | 
					
						
							|  |  |  |     being debugged is not running. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     A breakpoint represents a position or sets of positions in the code that, | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     when executed, interrupts the program being debugged and passes the | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     control to the user. The user is then free to examine the state of the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     interrupted program, or continue execution either line-by-line or continuously. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Typically, breakpoints are associated with a source code file and line, or | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     the start of a function -- both are allowed in Qt Creator. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Also, the interruption of a program by a breakpoint can be restricted with | 
					
						
							|  |  |  |     certain conditions. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     You can set a breakpoint: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |        \o At a particular line you want the program to stop -- click on the | 
					
						
							| 
									
										
										
										
											2008-12-08 15:14:36 +01:00
										 |  |  |           left margin or press \key F9 (\key F8 for Mac OS X). | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |        \o At a function that you want the program to interrupt -- enter the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |           function's name in \gui{Set Breakpoint at Function...} in | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |           \gui Debug menu. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     You can remove a breakpoint: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o By clicking on the breakpoint marker in the text editor. | 
					
						
							|  |  |  |         \o By selecting the breakpoint in the breakpoint view and pressing | 
					
						
							|  |  |  |            \key{Delete}. | 
					
						
							|  |  |  |         \o By selecting \gui{Delete Breakpoint} from the breakpoint's context | 
					
						
							|  |  |  |            menu in the \gui Breakpoints view. | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Breakpoints can be set and deleted before the program has actually started | 
					
						
							|  |  |  |     running or while it is running under the debugger's control. Also, | 
					
						
							|  |  |  |     breakpoints are saved together with a session. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Stack | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     When the program being debugged is interrupted, Qt Creator displays the | 
					
						
							|  |  |  |     nested function calls leading to the current position as a \e call stack | 
					
						
							|  |  |  |     trace. This stack trace is built up from \e{call stack frames}, each | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     representing a particular function. For each function, Qt Creator tries | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     to retrieve the file name and line number of the corresponding source | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     file. This data is shown in the \gui Stack view. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-16 18:39:10 +01:00
										 |  |  |     \image qtcreator-debug-stack.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     Since the call stack leading to the current position may originate or go | 
					
						
							|  |  |  |     through code for which no debug information is available, not all stack | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     frames have corresponding source locations. These frames are | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     grayed out in the \gui Stack view. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     If you click on a frame with a known source location, the text editor | 
					
						
							|  |  |  |     jumps to the corresponding location and updates the \gui{Locals and Watchers} | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     view, making it seem like the program was interrupted before entering the | 
					
						
							|  |  |  |     function. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Threads | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     If a multi-threaded program is interrupted, the \gui Thread view  or the | 
					
						
							| 
									
										
										
										
											2008-12-08 15:14:36 +01:00
										 |  |  |     combobox named \gui Thread in the debugger's status bar can be used to | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     switch from one thread to another. The \gui Stack view adjusts itself | 
					
						
							| 
									
										
										
										
											2008-12-08 15:14:36 +01:00
										 |  |  |     accordingly. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Modules View and Source Files View | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     These views display the debugger's idea of the components of the | 
					
						
							|  |  |  |     application. By default, both views are hidden. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section2 Disassembler View and Registers View | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     By default, both \gui Disassembler and \gui Registers view are hidden. | 
					
						
							|  |  |  |     The \gui Disassembler view displays disassembled code for the current | 
					
						
							|  |  |  |     function; the \gui Registers view displays the current state of the CPU's | 
					
						
							|  |  |  |     registers. Both views are useful for low-level commands such as | 
					
						
							|  |  |  |     \gui{Step Single Instruction} and \gui{Step Over Single Instruction}. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \section2 Locals and Watchers | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Whenever a program stops under the control of the debugger, it retrieves | 
					
						
							|  |  |  |     information about the topmost stack frame and displays it in the | 
					
						
							|  |  |  |     \gui{Locals and Watchers} view. This typically includes information about | 
					
						
							|  |  |  |     parameters of the function in that frame as well as the local variables. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Compound variables of struct or class type are displayed as | 
					
						
							| 
									
										
										
										
											2009-11-06 10:46:24 +01:00
										 |  |  |     "expandable" in the view. Click on the "+" to expand the entry and show | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     all members. Together with the display of value and type, the user can | 
					
						
							|  |  |  |     examine and traverse the low-level layout of an object's data. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |             \i  \bold{Note:} | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-15 17:28:04 +02:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |             \i  Gdb, and therefore Qt Creator's debugger works for optimized | 
					
						
							|  |  |  |                 builds on Linux and Mac OS X. However, optimization may lead | 
					
						
							|  |  |  |                 to re-ordering of instructions or sometimes even complete | 
					
						
							|  |  |  |                 removal of some local variables. In this case, the | 
					
						
							|  |  |  |                 \gui{Locals and Watchers} view may show unexpected data. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-15 17:28:04 +02:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |             \i  The debug information provided by gcc does not include enough | 
					
						
							|  |  |  |                 information about the time when a variable is initialized. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |                 Therefore, Qt Creator can not tell whether the contents of a | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |                 local variable contains "real data", or "initial noise". If a | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                 QObject appears uninitialized, its value is reported as | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |                 "out of scope". However, not all uninitialized objects can be | 
					
						
							|  |  |  |                 recognized as such. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     The \gui{Locals and Watchers} view also provides access to the most | 
					
						
							|  |  |  |     powerful feature of the debugger: comprehensive display of data belonging | 
					
						
							| 
									
										
										
										
											2009-11-06 10:46:24 +01:00
										 |  |  |     to Qt's basic objects. To enable this feature, select \gui{Use | 
					
						
							|  |  |  |     debugging helper} from the \gui Debug menu.The | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{Locals and Watchers} view is re-organized to provide a high-level | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |     view of the objects. For example, in case of QObject, instead of displaying | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     a pointer to some private data structure, you see a list of children, | 
					
						
							| 
									
										
										
										
											2008-12-02 13:06:53 +01:00
										 |  |  |     signals and slots. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     Similarly, instead of displaying many pointers and integers, Qt Creator's | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     debugger displays the contents of a QHash or QMap in an orderly manner. | 
					
						
							|  |  |  |     Also, the debugger displays access data for QFileInfo and provides | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     access to the "real" contents of QVariant. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The \gui{Locals and Watchers} view can be used to change the contents of | 
					
						
							|  |  |  |     variables of simple data types such as \c int or \c float when the program | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |     is interrupted. To do so, click on the \gui Value column, modify the value | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     with the inplace editor, and hit \key Enter (or \key Return). | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \note The set of watched items is saved in your session. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-16 16:24:38 +02:00
										 |  |  |     \section1 Debugging Helper Library | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     While debugging, Qt Creator dynamically loads a helper library into your | 
					
						
							| 
									
										
										
										
											2009-04-17 15:35:47 +02:00
										 |  |  |     program. This helper library enables Qt Creator to pretty print Qt and STL | 
					
						
							|  |  |  |     types. The Qt SDK package already contains a prebuilt debugging helper | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     library. To create an own debugging helper library, select \gui{Options} | 
					
						
							|  |  |  |     from the \gui{Tools} menu, and go to the \gui{Qt4 > Qt Versions} pane. As | 
					
						
							|  |  |  |     the internal data structures of Qt can change between versions, the debugging | 
					
						
							|  |  |  |     helper library is built for each Qt version. | 
					
						
							| 
									
										
										
										
											2009-04-16 16:24:38 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Walkthrough for the Debugger Frontend | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     In our \l{Writing a Simple Program with Qt Creator}{TextFinder} example, we | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     read a text file into QString and then display it with QTextEdit. | 
					
						
							|  |  |  |     Suppose you want to look at this QString, \c{line}, and see what | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     data it actually stores. Follow the steps described below to place a | 
					
						
							|  |  |  |     breakpoint and view the QString object's data. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |             \i \inlineimage qtcreator-setting-breakpoint1.png | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \i \bold{Setting a Breakpoint} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Click in between the line number and the window border on the line | 
					
						
							|  |  |  |         where we invoke \l{http://doc.trolltech.com/qtextedit.html#plainText-prop}{setPlainText()} | 
					
						
							|  |  |  |         to set a breakpoint. | 
					
						
							|  |  |  |         \o Select \gui{Start Debugging} from the \gui{Debug} menu or press \key{F5}. | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i \inlineimage qtcreator-setting-breakpoint2.png | 
					
						
							|  |  |  |             \i \bold{Viewing and removing breakpoints} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Breakpoints are visible in the \gui{Breakpoints} view in | 
					
						
							|  |  |  |     \gui{Debug} mode. To remove a breakpoint, right-click on | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     it and select \gui{Delete breakpoint} from the context menu. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \i \inlineimage qtcreator-watcher.png | 
					
						
							|  |  |  |             \i \bold{Viewing Locals and Watchers} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     To view the contents of \c{line}, go to the \gui{Locals and | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     Watchers} view. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     Suppose we modify our \c{on_findButton_clicked()} function to move back to | 
					
						
							|  |  |  |     the start of the document and continue searching once the cursor hits the | 
					
						
							|  |  |  |     end of the document. Adding this functionality can be done with the code | 
					
						
							|  |  |  |     snippet below: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \code | 
					
						
							|  |  |  |     void TextFinder::on_findButton_clicked() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |         QString searchString = ui->lineEdit->text(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |         QTextDocument *document = ui->textEdit->document(); | 
					
						
							|  |  |  |         QTextCursor cursor = ui->textEdit->textCursor(); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         cursor = document->find(searchString, cursor, | 
					
						
							|  |  |  |             QTextDocument::FindWholeWords); | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |         ui->textEdit->setTextCursor(cursor); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         bool found = cursor.isNull(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-24 10:01:00 +01:00
										 |  |  |         if (!found && previouslyFound) { | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             int ret = QMessageBox::question(this, tr("End of Document"), | 
					
						
							|  |  |  |             tr("I have reached the end of the document. Would you like " | 
					
						
							|  |  |  |             "me to start searching from the beginning of the document?"), | 
					
						
							|  |  |  |             QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (ret == QMessageBox::Yes) { | 
					
						
							|  |  |  |                 cursor = document->find(searchString, | 
					
						
							|  |  |  |                     QTextDocument::FindWholeWords); | 
					
						
							| 
									
										
										
										
											2009-03-24 17:57:43 +01:00
										 |  |  |                 ui->textEdit->setTextCursor(cursor); | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             } else | 
					
						
							|  |  |  |                 return; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         previouslyFound = found; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     \endcode | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     However, if you compile and run this code, the application does not work | 
					
						
							|  |  |  |     correctly due to a logic error. To locate this logic error, step | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     through the code using the following buttons: | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-debugging-buttons.png | 
					
						
							| 
									
										
										
										
											2009-04-08 16:34:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-project-pane.html | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     \page creator-cmake-support.html | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     \nextpage creator-generic-projects.html | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     \title CMake Support in Qt Creator | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Since Qt Creator 1.1, support for \c CMake project files is available. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt Creator 1.3 supports the Microsoft Toolchain if the CMake version | 
					
						
							| 
									
										
										
										
											2009-11-02 16:17:13 +01:00
										 |  |  |     is at least 2.8. | 
					
						
							| 
									
										
										
										
											2009-05-04 14:18:57 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |     \section1 Opening CMake Projects | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     To open a \c CMake project, select \gui Open from the \gui File menu and | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     select the \c{CMakeLists.txt} file from your \c CMake project. A wizard | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     guides you with the rest of the process. If the \c CMake project does | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     not have an in-place build, Qt Creator lets you specify the directory in | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     which the project is built (\l{glossary-shadow-build}{shadow build}). | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-17 16:09:54 +02:00
										 |  |  |     \image qtcreator-cmake-import-wizard1.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |     The screenshot below shows how you can specify command line arguments to | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     \c CMake for your project. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-17 16:09:54 +02:00
										 |  |  |     \image qtcreator-cmake-import-wizard2.png | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |     Normally, there is no need to pass any command line arguments for projects | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |     that are already built, as \c CMake caches that information. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Building CMake Projects | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Qt Creator builds \c CMake projects by running \c make, \c mingw32-make, or | 
					
						
							| 
									
										
										
										
											2009-11-02 16:17:13 +01:00
										 |  |  |     \c nmake depending on your platform. The build errors and warnings are | 
					
						
							|  |  |  |     parsed and displayed in the \gui{Build Issues} output pane. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     By default, Qt Creator builds the \e{all} target. You can specify which | 
					
						
							| 
									
										
										
										
											2009-05-04 14:18:57 +02:00
										 |  |  |     targets to build in \gui{Project} mode, under \gui{Build Settings}. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-17 16:09:54 +02:00
										 |  |  |     \image qtcreator-cmake-build-settings.png | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-04 14:18:57 +02:00
										 |  |  |     Qt Creator supports multiple build configurations. Also, the build | 
					
						
							|  |  |  |     directory can be modified after the initial import. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  |     \section1 Running CMake Projects | 
					
						
							| 
									
										
										
										
											2009-05-04 14:18:57 +02:00
										 |  |  |     Qt Creator automatically adds \gui{Run Configurations} for all targets | 
					
						
							|  |  |  |     specified in the \c CMake project file. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-15 17:28:04 +02:00
										 |  |  |     Known issues for the current version can be found | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:10 +01:00
										 |  |  |     \l{Known Issues of version 1.3.1}{here}. | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-cmake-support.html | 
					
						
							|  |  |  |     \page creator-generic-projects.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-external-library-handling.html | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Support for Generic Projects in Qt Creator | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Since Qt Creator 1.1, generic projects are supported in addition to | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     \c qmake projects. In other words, you can import existing projects that do | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     not use \c qmake or \c CMake and Qt Creator ignores your build | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     system. | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  |     This feature lets you use Qt Creator as a code editor. You can change the | 
					
						
							| 
									
										
										
										
											2009-09-01 14:48:39 +02:00
										 |  |  |     way your project is built by modifying the \c make command under | 
					
						
							|  |  |  |     \gui{Build Settings} in the \gui{Projects} mode. | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     For a generic project, you have to manually specify which files belong to | 
					
						
							|  |  |  |     your project and which include directories/defines you want to pass to your | 
					
						
							|  |  |  |     compiler. | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Specifying Files | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     The list of files for a generic project is specified in the \c{.files} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     file. When you first create a generic project, Qt Creator adds any | 
					
						
							|  |  |  |     files it recognizes to your project. To add or remove files later, | 
					
						
							|  |  |  |     edit the \c{.files} file in Qt Creator. Your project tree is refreshed | 
					
						
							|  |  |  |     when you save this file. You can also add or remove files from the context | 
					
						
							| 
									
										
										
										
											2009-09-01 14:48:39 +02:00
										 |  |  |     menu in the project tree. | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     If you frequently need to update the \c{.files} file, we recommend the use | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     of a small script that updates the files for you. If the | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     file is modified externally, Qt Creator must be restarted for the changes | 
					
						
							|  |  |  |     to take effect. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Specifying Include Paths | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-01 14:48:39 +02:00
										 |  |  |     The include paths are specified in the \c{.includes} file, one include | 
					
						
							|  |  |  |     path per line. The paths can be either absolute or relative to the | 
					
						
							|  |  |  |     \c{.includes} file. | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Specifying Defines | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     The defines are specified in the \c{.config} file. This file is a regular | 
					
						
							|  |  |  |     C++ file, prepended to all your source files when they are being parsed. | 
					
						
							|  |  |  |     However, you should only use it to add lines like the following: | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     \code | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  |     #define NAME value | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     \endcode | 
					
						
							| 
									
										
										
										
											2009-07-24 16:37:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-01 14:48:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Creating a Run Configuration | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     Qt Creator cannot automatically determine which executable it should run. | 
					
						
							|  |  |  |     To set up a custom executable run configuration in the \gui Projects mode, | 
					
						
							| 
									
										
										
										
											2009-09-01 14:48:39 +02:00
										 |  |  |     use the \bold{Add} button. Here you can specify the name, executable, and | 
					
						
							| 
									
										
										
										
											2009-08-03 14:54:55 +02:00
										 |  |  |     some optional arguments. By default, the working directory is | 
					
						
							|  |  |  |     \c{$BUILDDIR} which should work fine. | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-external-library-handling.html | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \page creator-qt-for-symbian.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-debugging.html | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Development of Qt for Symbian Based Applications | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator 1.3 comes with preliminary support for development of | 
					
						
							|  |  |  |     applications using Qt for the Symbian Platform. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \e{Note that this is highly experimental, and not intended for production use. | 
					
						
							|  |  |  |     The primary aim is to allow Symbian developers to familiarize themselves with Qt Creator | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     and provide feedback that helps us improve Symbian support in future versions of | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     Qt Creator.} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Please provide us with feedback, using the mailing list or IRC, as described on the | 
					
						
							|  |  |  |     \l{http://qt.gitorious.org/qt-creator/pages/Home}{Qt Creator Development Wiki}. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Getting Started with Symbian Based Applications | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     You need the following software installed on your PC. | 
					
						
							|  |  |  |     Only Windows development is supported. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/} | 
					
						
							|  |  |  |             {S60 Platform SDK 3rd Edition FP1 or higher} | 
					
						
							|  |  |  |         \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/} | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             {Open C/C++ v1.6.0 or higher} (Install this to all S60 SDKs you plan to use Qt with. | 
					
						
							|  |  |  |             This is included in the Qt for Symbian binary installers.) | 
					
						
							|  |  |  |         \o Either the GCCE ARM Toolchain that is included in the S60 Platform SDKs, or | 
					
						
							|  |  |  |             RVCT 2.2 [build 686] or later (which is not available free of charge) | 
					
						
							|  |  |  |             (Your environment needs to find the compiler in the PATH.) | 
					
						
							|  |  |  |         \o Qt for Symbian 4.6.0, installed into the S60 SDKs you want to use | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     For deploying and running applications on the device, you need the following: | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o The Nokia USB drivers that come e.g. with PC Suite | 
					
						
							|  |  |  |         \o The \l{http://tools.ext.nokia.com/trk/}{App TRK} application for your device | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Running Qt based applications on real devices requires the following packages to be installed on | 
					
						
							|  |  |  |     your device. The packages can be found in the S60 SDK where you installed Open C/C++: | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o nokia_plugin\\openc\\s60opencsis\\pips_s60_\<version\>.sis | 
					
						
							|  |  |  |         \o nokia_plugin\\openc\\s60opencsis\\openc_ssl_s60_\<version\>.sis | 
					
						
							|  |  |  |         \o nokia_plugin\\opencpp\\s60opencppsis\\stdcpp_s60_\<version\>.sis | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     If you want to run your applications in the Symbian emulator, you also need to install | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     Carbide.c++ v2.0.0 or higher. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Setting Up Qt Creator | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     When you run Qt Creator after installing the S60 Platform SDK and Qt for Symbian, | 
					
						
							|  |  |  |     the installed SDKs and their corresponding Qt versions are automatically detected. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     For each detected S60 SDK with Qt, a special entry is made in the Qt version management | 
					
						
							|  |  |  |     settings \gui{Tools > Options... > Qt4 > Qt Versions}. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 18:42:08 +01:00
										 |  |  |     \e{Note that if you manually add a Qt version for Symbian, you must | 
					
						
							|  |  |  |     also manually specify the S60 SDK to use for this version.} | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-qt4-qtversions-win-symbian.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     If you want to run your applications in the Symbian emulator, you need to point Qt Creator | 
					
						
							| 
									
										
										
										
											2009-11-12 18:42:08 +01:00
										 |  |  |     to the Metrowerks Compiler that you want to use, by setting the \gui{Carbide Directory} | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     of the Qt version to the corresponding Carbide.c++ installation directory. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     You can check what S60 SDKs and corresponding Qt versions are found in the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{Tools > Options... > Qt4 > S60 SDKs} preference page. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-qt4-s60sdks.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Building Your Project | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     After installing all the prerequisites and checking the setup in Qt Creator as described | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     above, you need to set up your project. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \e{Note that the only supported build system for Qt for Symbian applications in Qt Creator | 
					
						
							|  |  |  |     is qmake.} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Before you can build your project for the Symbian platform, you need to create build | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     configurations for it. | 
					
						
							|  |  |  |     Open \gui{Projects mode} and make sure that your project is selected for editing in | 
					
						
							|  |  |  |     \gui{Edit Project Settings for Project ...}. Add debug and release build configurations | 
					
						
							|  |  |  |     for the Symbian target by selecting the corresponding Qt version from the build configuration | 
					
						
							|  |  |  |     \gui{Add} menu. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-add-buildconfiguration.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     The created build configurations default to using the GCCE tool chain. If you want to build | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     for the device using RVCT, or for the Symbian emulator using WINSCW, select \gui{Show Details} | 
					
						
							|  |  |  |     and change the tool chain in the \gui{General} section of the build configuration settings. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Now you can switch to building your project for the device by selecting one of the | 
					
						
							|  |  |  |     new build configurations as the active configuration at the top of \gui{Projects mode}. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-change-buildconfiguration.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section1 Running Your Project | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Running Your Project in the Emulator | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Similar to the build configuration setup for your project, you need to create a run | 
					
						
							|  |  |  |     configuration for running your project in the Symbian emulator: | 
					
						
							|  |  |  |     \list 1 | 
					
						
							|  |  |  |         \o Switch to \gui{Projects mode}. | 
					
						
							|  |  |  |         \o Select \gui{Run Settings} > \gui{Add > YourApplication in Symbian Emulator} | 
					
						
							|  |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-add-run-in-emulator.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     To start your project in the emulator, select this run configuration as the active configuration | 
					
						
							|  |  |  |     at the top of \gui{Projects mode} window and press the run button. | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-change-run-in-emulator.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \section2 Running Your Project on the Device | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  |     To run your project on a real Symbian device, just add another run configuration in | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{Projects mode} via \gui{Run Settings} > \gui{Add > YourApplication on Symbian Device}. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-add-runconfiguration.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-details-runconfiguration.png | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     In the details of the run configuration you can specify a certificate to use, and | 
					
						
							|  |  |  |     select one of the devices that you have currently attached to your computer. | 
					
						
							|  |  |  |     The only connection mode supported at the moment is USB in \e{PC Suite} mode. | 
					
						
							|  |  |  |     For actually running your application on the device, you need to set the device run configuration | 
					
						
							|  |  |  |     as the active configuration at the top of \gui{Projects mode}. | 
					
						
							|  |  |  |     Start the \gui{App TRK} application on your device and press the run button to create | 
					
						
							|  |  |  |     a package for your application, deploy, install and run it automatically on your device. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \image qtcreator-symbian-change-runconfiguration.png | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  |     \section2 Troubleshooting | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     When something goes wrong, check the following: | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-11-13 11:29:50 +01:00
										 |  |  |         \o Did you build your application with a Qt version for Symbian? | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  |         \o Are the settings for the Qt version you use to build your project correct? Check the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |            path to the S60 SDK. Check also whether you need to specify the path to your compiler tool chain. | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  |         \o Is the emulator/device run configuration selected as the active run configuration? | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o Did you build using the right toolchain, i.e. WINSCW for running in the emulator, | 
					
						
							| 
									
										
										
										
											2009-11-13 10:57:53 +01:00
										 |  |  |             GCCE or RVCT for running on the device? | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o If the emulator process could not 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. | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |         \o Is the device connected via USB in \e{PC Suite} mode? | 
					
						
							|  |  |  |         \o Is App TRK running on the device, using the USB connection, and does it have status | 
					
						
							|  |  |  |             \e{connected}? | 
					
						
							|  |  |  |         \o Is your device detected and selected in the run configuration details? | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     If neither of this helps to solve your problem, search the qt-creator@trolltech.com | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     mailing list archives or provide feedback to us via the methods described on the | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  |     \l{http://qt.gitorious.org/qt-creator/pages/Home}{Qt Creator Development Wiki}. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-09 18:47:06 +02:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-generic-projects.html | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     \page creator-external-library-handling.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \nextpage creator-qt-for-symbian.html | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \title External Libraries | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  |     The ability to recognize external libraries is not only important for the | 
					
						
							| 
									
										
										
										
											2009-08-03 15:50:20 +02:00
										 |  |  |     underlying build system, but also for Qt Creator itself. This ability | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  |     allows Qt Creator to support code completion and syntax highlighting for | 
					
						
							|  |  |  |     external libraries as if they were part of the current project or the Qt | 
					
						
							|  |  |  |     library. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The procedure of adding a library to a project depends on the type of | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  |     project, which influences the build system used. The following sections | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     describe the procedure required for each project type. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     \section1 QMake Projects (the default) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  |     Open your project file (\c{.pro}) from the \gui{Projects} pane. Then, | 
					
						
							|  |  |  |     follow the guidelines in the | 
					
						
							| 
									
										
										
										
											2009-06-12 14:57:48 +02:00
										 |  |  |     \l{http://doc.trolltech.com/latest/make-project-files.html#declaring-other-libraries} | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     {Declaring other Libraries} section of the Qt documentation. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Syntax completion and highlighting work once your project successfully builds | 
					
						
							|  |  |  |     and links against the external library. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-13 18:00:54 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     \section1 CMake Projects | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 15:58:12 +02:00
										 |  |  |     In CMake, libraries are usually detected using the \c{FIND_PACKAGE()} | 
					
						
							|  |  |  |     macro. A couple of them are already being shipped with CMake, they can be | 
					
						
							|  |  |  |     found in the \c{Modules} directory of your CMake installation. If you | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     provide libraries on your own, you need to provide your own | 
					
						
							| 
									
										
										
										
											2009-08-03 15:58:12 +02:00
										 |  |  |     \c{FindFoo.cmake} file. Refer to the | 
					
						
							|  |  |  |     \l{http://vtk.org/Wiki/CMake_FAQ#Writing_FindXXX.cmake_files}{CMake FAQ} | 
					
						
							|  |  |  |     for details. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     As with \c qmake projects, syntax completion and highlighting work | 
					
						
							|  |  |  |     once you successfully build and link against the external library. | 
					
						
							| 
									
										
										
										
											2009-08-03 15:58:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  |     \section1 Generic Projects | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-03 15:58:12 +02:00
										 |  |  |     If you import a project using the \e{Generic Projects} function, Qt Creator | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     creates a file called \c{<projectname>.includes} in your project root | 
					
						
							|  |  |  |     directory. This file contains all project subdirectories for which Qt Creator | 
					
						
							|  |  |  |     found relevant headers. Add your include paths here. | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     Note that in \gui{Generic Project} mode, Qt Creator does not modify any project | 
					
						
							|  |  |  |     settings. | 
					
						
							| 
									
										
										
										
											2009-05-06 16:22:20 +02:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \previouspage creator-version-control.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \page creator-tips.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \nextpage creator-keyboard-shortcuts.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Tips and Tricks | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     \bold{Quickly Switching between Modes} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     You can quickly switch between modes by pressing \key{Ctrl+1}, | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     \key{Ctrl+2}, and so on. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-04 17:27:29 +01:00
										 |  |  |     \bold{Keyboard Shortcuts} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-16 16:57:00 +01:00
										 |  |  |     Qt Creator provides a lot of useful keyboard shortcuts. Some useful | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     shortcuts are listed \l{Keyboard Shortcuts}{here}. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \bold{Running Qt Creator from the command line} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 15:14:36 +01:00
										 |  |  |     You can start Qt Creator from a command prompt with the name of an existing | 
					
						
							|  |  |  |     session or \c{.pro} file by giving the name as argument on the command | 
					
						
							|  |  |  |     line. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \bold{Show and hide the sidebar} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-05 15:24:45 +01:00
										 |  |  |     You can show and hide the the sidebar in \gui Edit and \gui Debug mode by | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |     clicking on the corresponding icon, or by pressing \key{Alt+0} (Mac OS X: | 
					
						
							|  |  |  |     \key{Cmd+0}). | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \bold{Display signals and slots} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-05 15:24:45 +01:00
										 |  |  |     If you have an instance of a class that is derived from QObject, and you | 
					
						
							| 
									
										
										
										
											2009-01-26 10:52:48 +01:00
										 |  |  |     would like to find all other objects connected to one of your object's | 
					
						
							| 
									
										
										
										
											2008-12-05 15:24:45 +01:00
										 |  |  |     slots using Qt's signals and slots mechanism -- you can enable | 
					
						
							|  |  |  |     \gui{Use Custom Display for Qt Objects} feature under the \gui Debug menu. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-05 15:24:45 +01:00
										 |  |  |     In the \gui{Locals and Watchers} view, expand the object's entry and open | 
					
						
							|  |  |  |     the slot in the \e slots subitem. The objects connected to this slot are | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     shown as children of the slot. This method works with signals too. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \bold{Display low level data} | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-30 14:25:06 +02:00
										 |  |  |     If special debugging of Qt objects fails due to data corruption within the | 
					
						
							| 
									
										
										
										
											2009-06-10 17:38:32 +02:00
										 |  |  |     debugged objects, you can switch the debugging helpers off in the | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     \gui{Debugger > Debugging Helper} options dialog. | 
					
						
							|  |  |  |     This makes the low-level structures visible again. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-15 15:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-tips.html | 
					
						
							|  |  |  |     \page creator-keyboard-shortcuts.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \nextpage creator-glossary.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Keyboard Shortcuts | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator provides various keyboard shortcuts to aid in the development | 
					
						
							|  |  |  |     process. These shortcuts are listed in the table below: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \header | 
					
						
							|  |  |  |             \o Function | 
					
						
							|  |  |  |             \o Key Combination | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Welcome mode | 
					
						
							|  |  |  |             \o Ctrl + 1 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Edit mode | 
					
						
							|  |  |  |             \o Ctrl + 2 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Debug mode | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Ctrl + 3 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Projects mode | 
					
						
							|  |  |  |             \o Ctrl + 4 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Help mode | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Ctrl + 5 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Activate \gui Output mode | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Ctrl + 6 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \o Find | 
					
						
							|  |  |  |             \o Ctrl + F | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Find next | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o F3 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Go back to the code editor (\gui Edit mode: The first press | 
					
						
							|  |  |  |                gives the editor focus, without closing secondary windows; the | 
					
						
							|  |  |  |                second press closes all secondary windows. \gui Debug mode or | 
					
						
							|  |  |  |                \gui Help mode: Switch to \gui Edit mode.) | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Esc | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Go to a line | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Ctrl + L | 
					
						
							| 
									
										
										
										
											2009-05-06 17:09:27 +02:00
										 |  |  |         \row | 
					
						
							|  |  |  |             \o Navigate between pages | 
					
						
							|  |  |  |             \o Alt + Left, Alt + Right | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Start debugging | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o F5 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Stop debugging | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o Shift + F5 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Toggle code declaration and definition | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o F2 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Toggle header file and source file | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |             \o F4 | 
					
						
							|  |  |  |         \row | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o Toggle Sidebar | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |             \o Alt + 0 / Cmd + 0 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Toggle \gui{Build Issues} pane | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |             \o Alt + 1 / Cmd + 1 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Toggle \gui{Search Results} pane | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |             \o Alt + 2 / Cmd + 2 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 22:05:38 +01:00
										 |  |  |             \o Toggle \gui{Application Output} pane | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |             \o Alt + 3 / Cmd + 3 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |         \row | 
					
						
							| 
									
										
										
										
											2008-12-12 21:50:29 +01:00
										 |  |  |             \o Toggle \gui{Compile Output} pane | 
					
						
							| 
									
										
										
										
											2009-10-07 18:25:45 +02:00
										 |  |  |             \o Alt + 4 / Cmd + 4 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endtable | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     The table below lists keyboard shortcuts supported by the code editor. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Block navigation | 
					
						
							|  |  |  |             \i  To navigate between blocks, e.g., from one \bold{\{} to another | 
					
						
							|  |  |  |                 \bold{\}}, press \key{Ctrl+[} and \key{Ctrl+]}. | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Block selection | 
					
						
							|  |  |  |             \i  To select the current block, press \key{Ctrl+U}. Pressing | 
					
						
							|  |  |  |                 \key{Ctrl+U} again extends the selection to the parent block. | 
					
						
							|  |  |  |                 To deselect, press \key{Ctrl+Shift+U}. | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Moving lines up and down | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+Shift+Up} and \key{Ctrl+Shift+Down} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Completion | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+Space} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Indenting Blocks | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+I} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Collapse | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+\<} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Commenting or uncommenting blocks | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+\/} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Delete a line | 
					
						
							|  |  |  |             \i  Press \key{Shift+Del} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Switch between header file and source file | 
					
						
							|  |  |  |             \i  Press \key{F4}. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Increasing and decreasing font size | 
					
						
							|  |  |  |             \i  Press \key{Ctrl+Scroll Wheel} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \i  Follow symbols under the cursor | 
					
						
							|  |  |  |             \i  Press \key{F2} and \key{Shift+F2}. This feature works with | 
					
						
							|  |  |  |                 namespaces, classes, methods, variables, include statements, | 
					
						
							|  |  |  |                 and macros. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-15 15:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-keyboard-shortcuts.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \page creator-glossary.html | 
					
						
							|  |  |  |     \nextpage creator-supported-platforms.html | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \title Glossary | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \table | 
					
						
							|  |  |  |         \header | 
					
						
							|  |  |  |             \o  Term | 
					
						
							|  |  |  |             \o  Meaning | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \o | 
					
						
							|  |  |  |                 \raw HTML | 
					
						
							| 
									
										
										
										
											2009-11-12 18:42:08 +01:00
										 |  |  |                 Qt in PATH | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |                 \endraw | 
					
						
							|  |  |  |                 \target glossary-system-qt | 
					
						
							| 
									
										
										
										
											2009-11-12 18:42:08 +01:00
										 |  |  |             \o  This is the Qt | 
					
						
							|  |  |  |                 version for the \c qmake command found in your \c PATH | 
					
						
							| 
									
										
										
										
											2009-11-23 12:55:07 +01:00
										 |  |  |                 environment variable. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                 This is likely to be the system's Qt version. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \o | 
					
						
							|  |  |  |                 \raw HTML | 
					
						
							|  |  |  |                 Default Qt | 
					
						
							|  |  |  |                 \endraw | 
					
						
							|  |  |  |                 \target glossary-default-qt | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  The version of Qt configured in \gui{Tools > Options... > Qt 4 | 
					
						
							|  |  |  |                 > Default Qt Version}. This is the Qt version used by your | 
					
						
							|  |  |  |                 new projects. It defaults to the Qt in PATH. | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \o | 
					
						
							|  |  |  |                 \raw HTML | 
					
						
							|  |  |  |                 Project Qt | 
					
						
							|  |  |  |                 \endraw | 
					
						
							|  |  |  |                 \target glossary-project-qt | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |             \o  The version of Qt configured in \gui{Build&Run > Build | 
					
						
							|  |  |  |                 Settings > Build Configurations}. This is the Qt version that | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |                 is actually used by a particular project. It defaults to | 
					
						
							|  |  |  |                 Default Qt. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \row | 
					
						
							|  |  |  |             \o | 
					
						
							|  |  |  |                 \raw HTML | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |                 Shadow build | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |                 \endraw | 
					
						
							|  |  |  |                 \target glossary-shadow-build | 
					
						
							|  |  |  |             \o  Shadow building means building a project in a separate | 
					
						
							|  |  |  |                 directory, the \e{build directory}. The build directory is | 
					
						
							|  |  |  |                 different from the source directory. One of the benefits of | 
					
						
							|  |  |  |                 shadow building is that it keeps your source directory clean. | 
					
						
							|  |  |  |                 Shadow building is the best practice if you need many build | 
					
						
							|  |  |  |                 configurations for a single set of source. | 
					
						
							|  |  |  |     \endtable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-glossary.html | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  |     \page creator-supported-platforms.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \nextpage creator-known-issues.html | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \title Supported Platforms | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator is available in binary packages for the following platforms: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |         \o  Windows XP Service Pack 2 | 
					
						
							|  |  |  |         \o  Windows Vista | 
					
						
							|  |  |  |         \o  (K)Ubuntu Linux 7.04 32bit and 64 bit | 
					
						
							|  |  |  |         \o  Mac OS 10.4 and later | 
					
						
							|  |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-03 18:06:54 +01:00
										 |  |  |     \note Building Qt Creator itself from source requires \bold{Qt 4.6.0} or later. | 
					
						
							|  |  |  |           On Windows, MinGW 4.4 or Microsoft Visual Studio 2008 or later are required for compiling | 
					
						
							|  |  |  |           Qt Creator itself. | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-supported-platforms.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \page creator-known-issues.html | 
					
						
							| 
									
										
										
										
											2009-02-27 11:59:45 +01:00
										 |  |  |     \nextpage creator-acknowledgements.html | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  |     \title Known Issues | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     There are some known issues with Qt Creator. | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |     The development team is aware of them, there is no need to report them as bugs. | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-07 18:17:10 +01:00
										 |  |  |     \section1 Known Issues of Version 1.3.1 | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-09 17:44:43 +02:00
										 |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o Debugging Helper does not work while performing On-Device Debugging. | 
					
						
							| 
									
										
										
										
											2009-10-09 17:44:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o QML Preview (Run Project) only works if built against Qt with | 
					
						
							| 
									
										
										
										
											2009-10-09 17:44:43 +02:00
										 |  |  |            Declarative UI. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \o Setting breakpoints in code that is compiled into the binary more | 
					
						
							|  |  |  |            than once does not work. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o On Linux and Windows, installing Qt with one user account and | 
					
						
							| 
									
										
										
										
											2009-11-02 18:27:39 +01:00
										 |  |  |         then using it with another requires other users to manually set | 
					
						
							|  |  |  |         the Qt version. On Windows, setting the MinGW location is | 
					
						
							|  |  |  |         required as well. The same applies to the location of GDB for Symbian. | 
					
						
							|  |  |  |         A workaround is to copy %APPDATA%/Nokia/qtcreator.ini (Windows) or | 
					
						
							|  |  |  |         $HOME/.config/Nokia/QtCreator.ini (Linux) from the directory | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         of the user who installed Qt Creator to the other user. | 
					
						
							|  |  |  |         This issue does not exist on Mac OS X. | 
					
						
							| 
									
										
										
										
											2009-11-02 18:27:39 +01:00
										 |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-10-09 17:44:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \section1 Known Issues of Version 1.2.0 and 1.2.1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  |         \o Gdb on Windows may not work if the 'Embassy \reg Security Center' software | 
					
						
							|  |  |  |            by 'Wave \reg Systems' is installed and active (causing crashes in \c{vxvault.dll)}). | 
					
						
							| 
									
										
										
										
											2009-06-17 15:59:32 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  |         \o Only simple data types (POD) work in the Watch Window of CDB. | 
					
						
							| 
									
										
										
										
											2009-06-17 15:59:32 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \o Qt Creator uses SQLite for storing some of its settings. SQLite is | 
					
						
							|  |  |  |            known to have problems with certain NFS servers (most notably the | 
					
						
							|  |  |  |            nfs-user-server 2.2beta), since they can lock up the application | 
					
						
							|  |  |  |            when it tries to lock the database. If your home directory is on an | 
					
						
							|  |  |  |            NFS share and you encounter this issue, one option would be to | 
					
						
							|  |  |  |            switch to the nfs-kernel-server, or create a symlink so that the | 
					
						
							|  |  |  |            settings are stored locally. | 
					
						
							| 
									
										
										
										
											2009-05-28 15:31:12 +02:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-28 15:48:16 +02:00
										 |  |  |     \section1 Known Issues of Version 1.1.0 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o Paths or file names containing spaces or special characters, e.g., | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |            colons, dollar signs, hash marks etc. may cause problems. This | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |            is because some of the tools Qt Creator uses in the background have | 
					
						
							|  |  |  |            restrictions on the characters allowed in file and directory names. | 
					
						
							| 
									
										
										
										
											2009-02-04 14:15:13 +01:00
										 |  |  |            To be on the safe side, we recommend creating projects and project | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |            items with names consisting of plain characters, numbers, | 
					
						
							|  |  |  |            underscores, and hyphens. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o \c{.pro} files are reformatted if files have been added or removed. | 
					
						
							|  |  |  |            Whitespace is not preserved. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o There is no IDE support for adding files to include (\c .pri) files. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o There is no IDE support for adding/removing sub-projects. Project | 
					
						
							|  |  |  |            hierarchies (SUBDIRS template) have to be created manually. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o The file system sidebar does not update automatically. As a | 
					
						
							|  |  |  |            workaround, switch to another directory and then back. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o Loading KDE4 designer plugins breaks the style in KDE < 4.2.1 | 
					
						
							|  |  |  |            due to a bug in KDE. | 
					
						
							| 
									
										
										
										
											2008-12-17 16:33:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-16 17:01:25 +02:00
										 |  |  |         \o The DEFINES and INCLUDES set in \c{.pro} files are not dealt with | 
					
						
							|  |  |  |            on a file-specific level. Because of this, handling of DEFINES has | 
					
						
							|  |  |  |            been disabled completely. Also the \c{.qmake.cache} is not being | 
					
						
							|  |  |  |            parsed. In general, the \c{.pro} file parser is incomplete and | 
					
						
							|  |  |  |            problems are still to be expected. | 
					
						
							| 
									
										
										
										
											2008-12-17 16:33:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o Code completion for generated UI header files is updated only | 
					
						
							|  |  |  |            after a build. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \o Code completion does not support typedefs for nested classes. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         \o There is a kernel bug essentially making debugging unreliable on | 
					
						
							|  |  |  |            2.6.24 kernels for i386 (which is, unfortunately, the default on | 
					
						
							|  |  |  |            Ubuntu 8.04). See | 
					
						
							|  |  |  |            \l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/} for | 
					
						
							|  |  |  |            details. The only solution to this problem is to boot another | 
					
						
							|  |  |  |            kernel. | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o Gdb may take long to load debugging symbols, especially from large | 
					
						
							|  |  |  |            libraries like \c libQtWebKit. Starting the debugging module can | 
					
						
							|  |  |  |            take up to several minutes without visible progress. | 
					
						
							| 
									
										
										
										
											2008-12-17 16:33:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-03 15:41:03 +01:00
										 |  |  |         \o Setting breakpoints in files that do not have unique absolute | 
					
						
							|  |  |  |            paths may fail. For example, remounting parts of a file system | 
					
						
							|  |  |  |            using the --bind mount option. | 
					
						
							| 
									
										
										
										
											2008-12-17 16:33:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |         \o There is no syntax highlighting for \c CMake project files. | 
					
						
							| 
									
										
										
										
											2009-04-01 14:43:41 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         \o Project files included from \c{CMakeLists.txt} are not shown in the | 
					
						
							|  |  |  |            navigation tree. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o Using the Visual Studio Compiler with \c CMake is not supported. | 
					
						
							| 
									
										
										
										
											2009-04-01 14:43:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  |         \o Creating new \c CMake projects with Qt Creator is not supported. | 
					
						
							| 
									
										
										
										
											2009-04-01 14:43:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |         \o Having more than one build directory for \c CMake is not supported. | 
					
						
							| 
									
										
										
										
											2009-04-01 14:43:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-01 17:48:05 +02:00
										 |  |  |         \o Changing the build directory for \c CMake after the initial import | 
					
						
							|  |  |  |            is disabled. | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  |     \endlist | 
					
						
							| 
									
										
										
										
											2009-11-23 18:03:15 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-02 12:01:29 +01:00
										 |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-31 17:48:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  | /*! | 
					
						
							|  |  |  |     \contentspage index.html | 
					
						
							|  |  |  |     \previouspage creator-known-issues.html | 
					
						
							|  |  |  |     \page creator-acknowledgements.html | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \title Acknowledgements | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \section1 Third-party Components | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Qt Creator contains the following third-party components: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     \list | 
					
						
							|  |  |  |     \o  \bold{Open Source front-end for C++ (license MIT)}, enhanced for use in | 
					
						
							| 
									
										
										
										
											2009-02-27 12:00:39 +01:00
										 |  |  |         Qt Creator.\br | 
					
						
							|  |  |  |         Roberto Raggi <roberto.raggi@gmail.com>\br | 
					
						
							| 
									
										
										
										
											2009-03-05 11:15:18 +01:00
										 |  |  |         QtCreator/src/shared/cplusplus | 
					
						
							| 
									
										
										
										
											2009-02-27 10:32:10 +01:00
										 |  |  |     \endlist | 
					
						
							|  |  |  | */ |