Qt Creator IDE User Interface

Lecture




Introduction to Qt Creator

Introduction to Qt Creator

Qt Creator is a fully integrated development environment (IDE) that provides you with the tools for designing and developing complex applications for a variety of desktop and mobile platforms.

<img>

Projects

One of the greatest achievements of Qt Creator is that it allows the development team to work on a project on various platforms using common development and debugging tools.

But why do you need projects? To be able to build and run applications, Qt Creator needs the same information that the compiler will need. This information is specified in the build and launch project settings.

Creating a project will allow you to:

  • Group files together
  • Add custom build steps
  • Include forms and resource files
  • Specify settings for running applications

You can either create a project from scratch, or import an existing project. Qt Creator generates all the necessary files depending on the type of project being created. For example, if you choose to create an application with a graphical user interface (GUI), Qt Creator will create an empty .ui file that you can modify in the integrated Qt Designer .

Qt Creator is integrated with cross-platform build automation systems: qmake and CMake. You can also import existing projects that do not use qmake or CMake, and tell Qt Creator to simply ignore your build system.

Editors

Qt Creator comes with a code editor and Qt Designer for designing and building graphical user interfaces (GUIs) from Qt widgets.

Code editor

Since it is an IDE, Qt Creator differs from a text editor in that it knows how to build and run applications. He understands C ++ and QML as code, not as plain text. This allows him to:

  • Give you the opportunity to write well-formatted code.
  • Guess what you want to write and supplement the code
  • Display error and warning messages
  • Give you the ability to navigate between classes, functions, and symbols.
  • Provide you with context-sensitive help on classes, functions, and symbols.
  • Meaningfully rename characters so that other characters with the same name but belonging to other scopes of action will not be renamed
  • Show you the place in the code where the function was described or called

Interface designer

You can use Qt Designer to position and customize your widgets or dialogs and test them using different styles and screen resolutions. Widgets and forms created with Qt Designer are easily integrated into the program code using the Qt signal and slot mechanism, which will allow you to easily define the behavior of graphic elements. All properties set in Qt Designer can be dynamically changed in code. Moreover, features such as widget promotion and custom modules allow you to use your own widgets with Qt Designer .

Languages

You can use the editor to write code in Qt C ++ or in the declarative programming language QML.

QML

You can use QML to create a very flexible user interface from a wide range of QML elements. QML helps developers and designers work together to create flexible user interfaces that will be distributed on portable devices such as cell phones, media players, nettops and netbooks.

QML is a JavaScript extension that provides a mechanism for declaratively assembling a tree of objects from QML elements. QML improves the integration between JavaScript and an existing Qt system based on QObject, adds support for automatic property binding, and provides network transparency at the language level.

Goals

Qt Creator provides support for building and running applications on Qt for desktops (Windows, Linux and Mac OS) and mobile devices (Symbian, Maemo and MeeGo). Build settings allow you to quickly switch between build targets.

When you build an application for a mobile device connected to your computer, Qt Creator generates an installation package, installs it on the device, and starts it.

You can send the installation package to the Ovi Store. Packages for Symbian devices must be signed.

Instruments

Qt Creator is integrated with a set of useful tools, such as version control systems and a Qt emulator.

Version Control Systems

The recommended way to develop a project is to use a version control system. Qt Creator uses version control console clients to access your repositories. The following version control systems are supported:

  • Git
  • Subversion
  • Perforce
  • CVS
  • Mercurial

The features you have in Qt Creator depend on the version control system. Basic features are available for all supported systems. These include comparing files with the latest version in the repository and displaying the difference, viewing the version history and details of the changes, annotating the files, and accepting and discarding the changes.

Qt emulator

To test Qt applications designed for mobile devices in a similar environment, you can use the Qt emulator. You can change the device information about its settings and environment.

The Qt emulator is installed as part of the Nokia Qt SDK. After installation, you can select it as the build target in Qt Creator.

Debuggers

Qt Creator can help you debug your applications. It provides interfaces to the GNU Symbolic Debugger (gdb) and Microsoft Console Debugger (CDB) for debugging common C ++ applications and internal debuggers for Java Script. This includes the ability to connect mobile devices to your computer and debug programs running on them.

Qt Creator displays raw information provided by debuggers in an explicit and concise way in order to simplify the debugging process as much as possible without limiting the debugger capabilities.

Operating systems and supported platforms

Qt Creator is available in binary packages for the following operating systems:

  • Windows XP Service Pack 2
  • Windows vista
  • (K) Ubuntu Linux 7.04 (32-bit and 64-bit) or later, with the following:
    • g ++
    • make
    • libglib2.0-dev
    • libSM-dev
    • libxrender-dev
    • libfontconfig1-dev
    • libxext-dev
    • libfreetype6-dev
    • libx11-dev
    • libxcursor-dev
    • libxfixes-dev
    • libxft-dev
    • libxi-dev
    • libxrandr-dev
    • libgl-dev and libglui-dev if you use QtOpenGL
  • Mac OS 10.5 or later with the following:
    • The Xcode tools for your version of Mac OS X are available on the installation DVDs of your Mac OS X or at http://developer.apple.com.
Build Environment Variables

To build Qt Creator itself from source, you need:

  • Qt 4.7 or later
  • MinGW 4.4 or Microsoft Visual Studio 2008 on Windows

Supported Mobile Platforms

You can develop applications for the following mobile platforms:

  • Symbian
  • Maemo and Maemo Application Development and Debugging Environment (MADDE)

The following table summarizes the support for operating systems to build applications for mobile platforms.

operating system

Platform

Workspace

Symbian

Maemo

Windows

Yes

Yes

Yes

Linux

Yes

Not

Yes

Mac os x

Yes

Not

Not

Qt Creator user interface

  Qt Creator IDE User Interface

Starting Qt Creator opens Start mode where you can:

  • View lessons and examples.
  • View tips and tricks about using Qt Creator.
  • Create and open projects
  • Send a message to the development team
  • View recent sessions and projects.
  • Read news from Qt labs
  • Ask for support

To switch to another Qt Creator mode, you can use the mode switch.

Qt Creator has been translated into several languages. If the system language is one of the supported ones, it will be selected automatically. To change the language, select Tools> Options ...> Environment and select a language in the Language field. Changes will take effect after restarting Qt Creator.

Qt Creator Modes

The mode switch will allow you to quickly switch between tasks such as editing the project and the source file, designing the application interface, setting up the assembly and execution of projects, and debugging your applications. To change the mode, click on the desired icon or use the corresponding keyboard shortcuts.

You can use Qt Creator in the following modes:

  • Editor mode is used to edit the project and source files.
  • Design mode is used to design and create user interfaces for an application. This mode is available for user interface files.
  • Debug mode is used to view the status of your program during debugging.
  • The Projects mode is used to customize the build and run the project. This mode is available only if the project is open.
  • Help mode is used to view the Qt documentation.

Certain actions in Qt Creator cause a mode change. For example, Debug > Start Debug > Start Debug will automatically switch to Debug mode.

View project content

Sidebar is available in Editor and Debug mode. Use the sidebar to view files, projects and bookmarks.

  Qt Creator IDE User Interface

You can select the contents of the sidebar in the sidebar menu:

  • Projects will show a list of open projects in the current session.
  • The file system will show the contents in the selected directory.
  • Bookmarks will show all bookmarks for the current session.
  • Open documents will show the currently open documents.

You can change the sidebar view in the following ways:

  • To hide or show the panel click   Qt Creator IDE User Interface or Alt + 0 ( Cmd + 0 on Mac OS X).
  • To split the sidebar click   Qt Creator IDE User Interface . Select new content to view in a split view.
  • To close the view, click   Qt Creator IDE User Interface .

View project files

The sidebar shows the projects in the project tree. The project tree contains a list of all projects opened in the current session. Files of each project are grouped according to their type.

You can use the project tree in the following ways:

  • To call the context menu containing the most frequently used actions, right-click on an element in the project tree. For example, through the root menu of a project tree, you can, among other things, build, rebuild, clean or run a project.
  • To view all the files in the project, click   Qt Creator IDE User Interface and select Simplify Tree .
  • To hide the source files that were generated by the build system automatically, click   Qt Creator IDE User Interface and select Hide generated files .
  • To switch the synchronization of the tree of your project with the files opened in the editor, click   Qt Creator IDE User Interface .
  • To see the absolute path to the file, hurt the mouse cursor on its name.

View output

The taskbar in Qt Creator can display one of the following panels:

  • Build messages
  • searching results
  • Application console
  • Console build
  • Key messages
  • Version control

Output panels are available in all modes. To open the output panel, click on its name. To expand the output pane, click the Expand Output Pane button or press Alt + 9 .

To search in the Console and Console assembly views, activate them and press Ctrl + F. Enter the search string in the Search field and click the left arrow or the right arrow to search down or up.

To open the Basic Messages and Version Control panels, select Window> Output Panels .

Build messages

The Assembly Messages panel provides a list of errors and warnings that occurred during the assembly. This panel filters out minor compiler messages and displays errors in an ordered manner.

Clicking with the right mouse button on a line will bring up a context menu with which you can copy the contents and call up the change history from the control system for the line that caused the error message.

  Qt Creator IDE User Interface

searching results

The Search Results pane displays the results of global searches, such as searches within the current document, files on disk, or in all projects.

The screenshot below shows an example of the search results for all references to a textfinder inside the "/ TextFinder" directory.

  Qt Creator IDE User Interface

Application console

The console panel of the application displays the status of the program when it runs and debug information.

The screenshot below shows an example of the qDebug () output.

  Qt Creator IDE User Interface

Console build

The assembly console panel provides all the compiler output. The assembly console provides a more verbose display of information compared to the Assembly messages panel.

  Qt Creator IDE User Interface

Moving with the keyboard

Qt Creator is suitable not only for developers who are used to using the mouse, but also for developers who are more comfortable with the keyboard. A large set of keyboard shortcuts and a search engine help speed up the development process for your application.


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Cross platform programming

Terms: Cross platform programming