P. 1
Qt Creator 1

Qt Creator 1

|Views: 119|Likes:
Published by Vishwas N Prasad

More info:

Published by: Vishwas N Prasad on Jun 16, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/16/2011

pdf

text

original

Qt Creator is a complete integrated development environment (IDE) for creating applications with the Qt application framework.

Qt is designed for developing applications and user interfaces once and deploying them across several desktop and mobile operating systems. This paper provides an introduction to Qt Creator and the features it provides to developers.

Mac OS X.com/products/files/pdf/qt-4. usability. Qt Creator does not compete with the Qt plugins for Eclipse™ or Microsoft®Visual Studio®. Pre-built binaries are available for Microsoft Windows®. Qt SDK is available for Microsoft Windows. please see the Qt whitepaper and datasheet: http://qt.6-whitepaper http://qt. but rather complements Qt tools offering by providing a complete development environment for Qt that is easy and quick to start using. functions and classes quickly. Building and running Qt Creator from source code may require a separate installation of Qt on your computer. The main inspirations for Qt Creator have been the development needs of Qt developers. It is a single package that contains both Qt Creator and the latest version of Qt application framework for creating applications. Enjoy new powerful features for navigating between project files. Qt Creator can be run other platforms. and Linux®. and facilitates the use of Qt-specific features. looking for simplicity.nokia. but that requires the compilation of the publicly available source code.nokia.com/products/files/pdf/qt-cross-platform-application-framework-datasheet . The easiest way to get started is the Qt SDK (Software Development Kit). and quick access to recent projects and sessions. • Build and execute Qt projects with the qmake cross-platform build tool. In general.nokia. and Linux from the following location: http://qt. The key features of Qt Creator aid the application developer in the following ways: • Quick and easy start of Qt application development with a project wizard. productivity. extendibility and openness. while aiming to lower the barrier of entry for newcomers to Qt. • Debug with the GNU and CDB debuggers using a graphical user interface with increased awareness of Qt class structures.com/downloads For more information. • Develop applications with the advanced C++ code editor and integrated Qt Designer.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) 1. Qt is designed for developing applications and user interfaces once and deploying them across several desktop and mobile operating systems. Introduction Qt Creator is a complete integrated development environment (IDE) for creating applications with the Qt application framework. integrated Qt Help system. • Easy access to information with the context-sensitive. Qt Creator runs on every desktop platform supported by Qt. • Experimental support for creation of Qt applications for Symbian-based devices. Mac OS X®.

ease-of-use. • Debug to inspect the state of the program while debugging. Working with Qt Creator Qt Creator meets its design goals of simplicity. These adapt the user interface to the different application development tasks encountered. • Projects to configure how the projects are built and executed. build issues. Figure 1 presents the key parts of Qt Creator’s user interface (UI). or using a set of keyboard shortcuts. for instance. As a result. Each mode has its own view that shows only the information required for performing a given task and provides only the most relevant features and functions related to it. compilation and application output. • Help to view documentation. Qt Creator has a Mode Selector on the left of the window. • Edit to modify the active project and its source files.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) 2. the user can access one of the following modes at a time: • Welcome to load recent sessions or specific projects. the majority of the Qt Creator window area is always dedicated to actual application development tasks. Figure 1: The main parts of Qt Creator user interface in Edit mode. and productivity by relying on the concept of modes. With the aid of selector. To swap between modes quickly. such as the Qt reference documentation and the Qt Creator documentation. To illustrate this. • Output enables examining various data in detail. 2 .

• Application output shows the status of the application during the execution as well as debug information when debugging the application. the Sidebar is shown. Next to the Locator are controls for showing one of the four different Output panes in the bottom of the window: • Build issues displays the warnings and errors related to the current build. • Search results shows the results of global searches within current document. 3 . The Locator below the Sidebar enables the user to quickly locate a file. or projects. files. The use of these special purpose panes together with specialized views for each mode.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) Figure 2: The advanced C++ code editor of Qt Creator. Beneath the Mode Selector are command buttons for executing. In the Edit and Debug modes. starting debugging. These modes display and provide access to the currently open files in a bar on the top of the window. This displays all the files that belong to the active project. makes Qt Creator intuitive to use and encourages task-oriented development. as well as the symbol at the current location inside the file. or access information from the files in the project. and building the current project. • Compile output displays all the output provided by the compiler. The bar also displays a Symbol Overview which displays the symbols related to the current file.

user interface descriptions and project files. supporting both Qt classes and the user’s own classes in the current project. methods and function arguments. where the editor fills most of the window area.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) 2. Not only does the wizard help new users get up and running quickly. Qt specific settings (such as select the needed modules). • Quick switching between method definition and function declaration. editing and navigating in source code are core tasks in application development. Therefore. accessible through a keyboard shortcut. In addition to this. • Auto-indentation for source code layout. Next. or Qt library. • Bookmarks for easier navigation in the code. Figure 2 shows an example of the Edit view. before specifying the details of the first class of the application. making it unnecessary to use compilation simply as a way to find typos and syntax errors. • The ability to collapse and expand functions in the source code (code folding). it also enables more experienced users to streamline their workflow for the creation of new projects. and macros.2. the C++ editor offers a number of features that help developers maintain readability and coding style: • Syntax highlighting for keywords. The convenient user interface makes it easier to ensure that a project begins with the correct configuration and dependencies. the C++ code editor is one of the key components of Qt Creator. the C++ code editor supports different keyboard shortcuts for faster editing. • Line numbering and current line highlighting. • Easy commenting and uncommenting of code. as defined by the wizard. • Code completion for class members. source files.1. A Project Wizard for Qt Projects Setting up a new project in Qt Creator is aided by a wizard that guides the user step-by-step through the project creation process. symbols. It is possible to work without using the mouse at all. such as: • Incremental search that highlights the matching strings in the window while typing. the user can select a location for the project. Qt GUI (Graphical User Interface) application. Advanced C++ Code Editor Writing. In addition to these features. • Live marking (wavy underlining in red) of errors while editing. Qt Creator will automatically generate the project with required headers. In the first step. As can be seen in Figure 2. When the steps have been completed. 4 . the editor has other useful features. allowing the developer to keep their hands on the keyboard and work more productively. the user selects the type of the project from the categories: Qt console application. 2.

5 . such as connecting signals and slots. Integrated Qt Designer When in the Edit mode. Figure 3 shows integrated Qt Designer being used to edit a simple form. The Qt Designer integration also includes project management and code completion.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) Figure 3: The integrated Qt Designer tool in action. Qt Creator provides a fully integrated Qt Designer for editing user interface files. the user can use the integrated Qt Designer for many other tasks. These include the Object Inspector (top-right). Qt Designer and related Qt features are described in more detail in the Qt whitepaper. which shows the hierarchy of the objects in the current user interface. used to configure the currently selected widget. There is no need to recompile the entire project to test out a new design. and setting the tab order. 2. with the available UI components (widgets) kept in the container on the left side of the window. In addition. Other tools are positioned around the edge of the working area. Figure 3 shows how Qt Designer is integrated into Qt Creator. This presents the developer with an intuitive drag-and-drop interface for composing new user interfaces. and the Property Editor (right). The user interfaces that are designed with Qt Designer are fully functional and can be previewed immediately to ensure that the design is as intended.3. creating actions for toolbars and menus. The center of the view is used for the construction of the user interface.

a popular alternative. and build settings can be manually specified in the project’s configuration. In cases like these. application developers may need further information about a certain class.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) Figure 4: Displaying context sensitive Qt Help information. The documentation will be displayed within a panel on the right side of the code editor. Mac OS X. Integrated Qt Help From time to time. 6 . as shown in Figure 4. Qt’s own build tool.5. To view the documentation. Build System Support As well as providing support for qmake. complementing or replacing the existing documentation as required. Qt Creator works as a code editor. While working with source code in Edit mode. CMake is a cross-platform configuration and build tool that works with the native compiler toolchains on Windows. where most of the window is devoted to the help text. or do not want to associate a build system with their project at all. or other part of the Qt API. 2. the Help mode is used. It is also possible to add external documentation to Qt Creator. Qt Creator also supports generic projects.4. Linux and other platforms that the tool supports. 2. function. Qt Creator also comes with support for CMake. the user can access context sensitive help by moving the text cursor to a Qt class or function and then press the F1 key. All of Qt’s documentation and examples are accessible via Qt Help plugin in Qt Creator. where developers either use an unsupported build system.

The user can narrow down searches by adding a prefix character followed by space before the search string. search all open documents. the list is updated automatically. Locator for Navigating between Files and Information While editing source code. The Locator tool (Figure 5) is designed to make navigation more efficient for the user by introducing a set of keystrokes as shortcuts to information sources. and navigate to a certain line in the current document. Supported systems include Git. and to access multiple sources of information. search files in the current project. 2. When the user starts typing a text string in the Locator.7. open help topics. User interface elements for displaying commits and managing repositories are also provided for certain systems. it shows the files whose name contains the string in a pop-up list. Version Control Systems Qt Creator supports a number of version controls systems. 7 . Configuration is straightforward. locate classes and methods. Developers can add custom filters to restrict the results to those from certain files. enabling developers to search all files. This makes it more convenient for developers who spend most of their time working with specific libraries or projects. The wildcard characters (* and ?) can be used in search queries.6. the developer often needs to move between different files. As the user continues typing. Output for each system is shown in the Version Control output pane. Subversion. CVS and Perforce. integrating their use into the working environment. with common settings for version control located together and features for specific version control systems located in Tools sub-menus. A set of standard prefixes are available.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) Figure 5: The Locator navigation tool for quick access to files and information. 2.

the developer can perform common debugging tasks. In addition. Qt Creator tries to retrieve its location (the name of source code file and the related line number) and present it in the Stack view. and use the new configuration in future sessions. • Step through the program line-by-line or instruction-by-instruction. The debugger is aware of the structure of many Qt classes. is displayed in the Locals and Watchers view. the Call Stack lists all the frames. The developer can select a set of tools to display debugging information in the debugging pane. • Set breakpoints. as shown in Figure 6. Although the most frequently used panels are shown by default. which is one features that makes the Qt Creator debugger more powerful than other alternatives for developing Qt applications. However. In this mode. and local and global variables.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) 3. which represent the nested function calls leading to the current position. Qt Creator supports the GCC compiler and GDB debugger from the GNU Compiler Collection as well as the Microsoft Visual Studio compiler and debugger (cl and cdb). some functions in call stack may not have any debug information available. • Examine call stack contents. 8 . The view itself shows the function and the local variables. It is also possible to change the panels’ positions and sizes. Qt Creator provides a debugging mode that provides a graphical user interface for the debugger you use for your project. An example of this can be seen in Figure 6 where the compound variables are displayed as an expandable tree. The top stack call frame (or the selected). thus increasing its ability to display Qt’s data clearly. it is possible to change them to suit your preferences. Compiling and debugging Currently. When the program execution is stopped during the debugging. Figure 6 shows Qt Creator in Debug mode with the debugging tools pane below the code editor. A red marker next to the line number on the left in the code editor shows a breakpoint set at a specific line in the source code (Figure 6). These frames are then shown as grayed out. For each function in call stack. Qt Creator displays the raw information from GDB in a clear and concise manner. including the following: • Interrupt program execution. The figure also shows Qt Creator’s comprehensive display of data inside instances of Qt’s core classes. watchers. Breakpoints can be set at a specific line or at a specific function.

Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) Figure 6: The debug mode of Qt Creator showing a breakpoint in the editor view. 9 . and call stack view and a watch view.

makes Qt Creator the ideal environment developing Qt applications.nokia.Qt Creator Whitepaper © 2009 Nokia Corporation and/or its subsidiary(-ies) 4. It is a lightweight tool with a strict focus on Qt application developer-specific needs. 10 . Integrating Qt Designer.com/products/developer-tools/developer-tools. Summary Qt Creator offers a complete development environment for Qt application creation. Key features are the advanced C++ code editor and a graphical user interface for debugging. Support for cross-platform build systems and version control software ensures that Qt Creator can be integrated fully into a development team’s working environment. Qt Creator is available from http://qt. Qt Creator’s mode-centric way of working helps developers to focus on the task at hand by presenting only relevant user interface features to them. and usability. productivity. and the Locator tool for quick navigation. Qt Help.

special. This document is licensed under the Creative Commons Attribution-Share Alike 2. Nokia operates a policy of continuous development.5 license. Additional company and product names are the property of their respective owners and may be trademarks or registered trademarks of the individual companies and are respectfully acknowledged. For its Qt products. Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies).Nokia.org/licenses/by-sa/2. express or implied. Under no circumstances shall Nokia Corporation be responsible for any loss of data or income or any direct. For more information. incidental. Qt. No warranty. is made about the accuracy and/or quality of the information provided herein. and the Qt logo are trademarks of Nokia Corporation and/or its subsidiary(-ies) in Finland and other countries. see http://creativecommons. the Nokia logo. Therefore. we reserve the right to make changes and improvements to any of the products described herein without prior notice. consequential or indirect damages whatsoever.5/legalcode for the full terms of the license. . All information contained herein is based upon the best information available at the time of publication.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->