Viadeo Twitter Google Bookmarks ! Facebook Digg MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Qt Examples

Qt is supplied with a variety of examples that cover almost every aspect of development. They are not all designed to be impressive when you run them, but their source code is carefully written to show good Qt programming practices. You can launch any of these programs from the Examples and Demos Launcher application.

These examples are ordered by functional area, but many examples often use features from many parts of Qt to highlight one area in particular. If you are new to Qt, you should probably start by going through the Tutorials before you have a look at the Application example.

In addition to the examples and the tutorial, Qt includes a selection of demos that deliberately show off Qt's features. You might want to look at these as well.


Qt comes with a large range of standard widgets that users of modern applications have come to expect. You can also develop your own custom widgets and controls, and use them alongside standard widgets.

It is even possible to provide custom styles and themes for widgets that can be used to change the appearance of standard widgets and appropriately written custom widgets.


Qt includes standard dialogs for many common operations, such as file selection, printing, and color selection.

Custom dialogs can also be created for specialized modal or modeless interactions with users.

Main Windows

All the standard features of application main windows are provided by Qt.

Main windows can have pull down menus, tool bars, and dock windows. These separate forms of user input are unified in an integrated action system that also supports keyboard shortcuts and accelerator keys in menu items.


Qt uses a layout-based approach to widget management. Widgets are arranged in the optimal positions in windows based on simple layout rules, leading to a consistent look and feel.

Custom layouts can be used to provide more control over the positions and sizes of child widgets.

Item Views

Item views are widgets that typically display data sets. Qt 4's model/view framework lets you handle large data sets by separating the underlying data from the way it is represented to the user, and provides support for customized rendering through the use of delegates.

Graphics View

Qt is provided with a comprehensive canvas through the GraphicsView classes.


Qt's painting system is able to render vector graphics, images, and outline font-based text with sub-pixel accuracy accuracy using anti-aliasing to improve rendering quality.

Rich Text

Qt provides powerful document-oriented rich text engine that supports Unicode and right-to-left scripts. Documents can be manipulated using a cursor-based API, and their contents can be imported and exported as both HTML and in a custom XML format.


Qt provides features to enable applications to integrate with the user's preferred desktop environment.

Features such as system tray icons, access to the desktop widget, and support for desktop services can be used to improve the appearance of applications and take advantage of underlying desktop facilities.

Drag and Drop

Qt supports native drag and drop on all platforms via an extensible MIME-based system that enables applications to send data to each other in the most appropriate formats.

Drag and drop can also be implemented for internal use by applications.

Threading and Concurrent Programming

Qt 4 makes it easier than ever to write multithreaded applications. More classes have been made usable from non-GUI threads, and the signals and slots mechanism can now be used to communicate between threads.

The QtConcurrent namespace includes a collection of classes and functions for straightforward concurrent programming.


Qt is equipped with a range of capable tool classes, from containers and iterators to classes for string handling and manipulation.

Other classes provide application infrastructure support, handling plugin loading and managing configuration files.


Qt is provided with an extensive set of network classes to support both client-based and server side network programming.

Inter-Process Communication

Simple, lightweight inter-process communication can be performed using shared memory and local sockets.

OpenGL and OpenVG Examples

Qt provides support for integration with OpenGL implementations on all platforms, giving developers the opportunity to display hardware accelerated 3D graphics alongside a more conventional user interface.

Qt provides support for integration with OpenVG implementations on platforms with suitable drivers.

Multimedia Framework

Qt provides low-level audio support on linux,windows and mac platforms by default and an audio plugin API to allow developers to implement there own audio support for custom devices and platforms.

The Phonon Multimedia Framework brings multimedia support to Qt applications.


Qt provides extensive database interoperability, with support for products from both open source and proprietary vendors.

SQL support is integrated with Qt's model/view architecture, making it easier to provide GUI integration for your database applications.


XML parsing and handling is supported through SAX and DOM compliant APIs as well as streaming classes.

The XQuery/XPath and XML Schema engines in the QtXmlPatterns modules provide classes for querying XML files and custom data models.

Qt Designer

Qt Designer is a capable graphical user interface designer that lets you create and configure forms without writing code. GUIs created with Qt Designer can be compiled into an application or created at run-time.


User interfaces created with Qt Designer can be loaded and displayed at run-time using the facilities of the QtUiTools module without the need to generate code in advance.

Qt Linguist

Internationalization is a core feature of Qt.

Qt Script

Qt is provided with a powerful embedded scripting environment through the QtScript classes.


Qt provides an integrated Web browser component based on WebKit, the popular open source browser engine.

Help System

Support for interactive help is provided by the Qt Assistant application. Developers can take advantages of the facilities it offers to display specially-prepared documentation to users of their applications.

State Machine

Qt provides a powerful hierarchical finite state machine through the Qt State Machine classes.

Animation Framework

These examples show to to use the animation framework to build highly animated, high-performance GUIs.

Multi-Touch Framework

Support for multi-touch input makes it possible for developers to create extensible and intuitive user interfaces.


Applications can be written to respond to gestures as a natural input method. These examples show how to enable support for standard and custom gestures in applications.


Systems with limited resources, specialized hardware, and small screens require special attention.

Qt for Embedded Linux

D-Bus is an inter-process communication protocol for Unix/Linux systems. These examples demonstrate how to write application that communicate with each other.


These examples demonstrate how to write ActiveX controls and control servers with Qt, and how to use ActiveX controls and COM objects in a Qt application.

Qt Quarterly

One more valuable source for examples and explanations of Qt features is the archive of Qt Quarterly, a newsletter for Qt developers.

[Previous: Tutorials] [How to Learn Qt] [Next: Qt Demonstrations]


Best Of

Actualités les plus lues

  1. Microsoft ouvre aux autres compilateurs C++ AMP, la spécification pour la conception d'applications parallèles C++ utilisant le GPU 22
  2. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 38
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. RIM : « 13 % des développeurs ont gagné plus de 100 000 $ sur l'AppWord », Qt et open-source au menu du BlackBerry DevCon Europe 0
  5. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le blog Digia au hasard


Créer des applications avec un style Metro avec Qt, exemples en QML et C++, un article de Digia Qt traduit par Thibaut Cuvelier

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.



Liens utiles


  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.6
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !

Hébergement Web