Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Tous les espaces de nom  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

An Overview of Qt's Examples

Qt is supplied with a variety of examples that cover almost every aspect of development. These examples are ordered by functional area, but many examples often use features from many parts of Qt to highlight one area in particular.

This document provides a brief overview of each example category and provides links to the more formal list of examples.

Widgets

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.

Dialogs

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.

Layouts

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.

Painting

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.

These examples show the most common techniques that are used when painting with Qt, from basic concepts such as drawing simple primitives to the use of transformations.

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.

These examples demonstrate the fundamental aspects of canvas programming with Qt.

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.

Tools

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.

Desktop

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.

Threads

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.

Additionally, it is now possible to move objects between threads.

Concurrent Programming

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

These examples show how to apply the basic techniques of concurrent programming to simple problems.

Network

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

These examples demonstrate the fundamental aspects of network programming with Qt.

XML

XML parsing and handling is supported through SAX and DOM compliant APIs.

Qt's SAX compliant classes allow you to parse XML incrementally; the DOM classes enable more complex document-level operations to be performed on XML files.

XML Patterns: XQuery & XPath

Qt provides an XQuery & XPath engine, QtXmlPatterns, that can be used on XML files and custom data models, similar to the model/view framework.

OpenGL

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.

These examples demonstrate the basic techniques used to take advantage of OpenGL in Qt applications.

SQL

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.

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.

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.

UiTools

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 Linguist

Internationalization is a core feature of Qt. These examples show how to access translation and localization facilities at run-time.

Qt Script

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

These examples demonstrate the fundamental aspects of scripting applications with Qt.

Phonon Multimedia Framework

The Phonon Multimedia Framework brings multimedia support to Qt applications.

The examples and demonstrations provided show how to play music and movies using the Phonon API.

WebKit

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

These examples and demonstrations show a range of different uses for WebKit, from displaying Web pages within a Qt user interface to an implementation of a basic function Web browser.

Qt for Embedded Linux

These examples show how to take advantage of features specifically designed for use on systems with limited resources, specialized hardware, and small screens.

ActiveQt

Qt is supplied with a number of example applications and demonstrations that have been written to provide developers with examples of the Qt API in use, highlight good programming practice, and showcase features found in each of Qt's core technologies.

The example and demo launcher can be used to explore the different categories available. It provides an overview of each example, lets you view the documentation in Qt Assistant, and is able to launch examples and demos.

Another Source of Examples

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

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 43
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

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.

Communauté

Ressources

Liens utiles

Contact

  • 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.4
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 !
 
 
 
 
Partenaires

Hébergement Web