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  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Qt for Embedded Linux Display Management

When rendering, the default behavior for each Qt for Embedded Linux client is to render its widgets into memory, while the server is responsible for putting the contents of the memory onto the screen. The server uses the screen driver to copy the content of the memory to the display.

The screen driver is loaded by the server application when it starts running, using Qt's plugin system.

Contents:

Available Drivers

Qt for Embedded Linux provides drivers for the Linux framebuffer, the virtual framebuffer, transformed screens, VNC servers and multi screens. Run the configure script to list the available drivers:

 ./configure -help

In the default Qt configuration, only an unaccelerated Linux framebuffer driver (/dev/fb0) is enabled. The various drivers can be enabled and disabled using the configure script. For example:

 ./configure -qt-gfx-transformed

Custom screen drivers can be implemented by subclassing the QScreen class and creating a screen driver plugin (derived from the QScreenDriverPlugin class). The default implementation of the QScreenDriverFactory class will automatically detect the plugin, loading the driver into the server application at run-time.

Specifying a Driver

To specify which driver to use, set the QWS_DISPLAY environment variable. For example (if the current shell is bash, ksh, zsh or sh):

 export QWS_DISPLAY="<driver>[:<driver specific options>]...
          [:<display num>]"

The valid values for the <driver> argument are LinuxFb, QVFb, VNC, Transformed, Multi and keys identifying custom drivers, and the <display num> argument is used to separate screens that are using the same screen driver and to enable multiple displays (see the Running Qt for Embedded Linux Applications documentation for more details). The driver specific options are described in the table below.

Driver Specific OptionAvailable ForDescription
tty=<device>LinuxFbPasses the device file to the console the application is running on.
nographicsmodeswitchLinuxFbEnsures that the application is not in graphics mode.
littleendianLinuxFbTells the driver it must handle a little-endian frame buffer in a big-endian system.
mmWidth=<value> LinuxFb, QVFbThe screen's physical width (used to calculate DPI).
mmHeight=<value> LinuxFb, QVFbThe screen's physical height (used to calculate DPI).
<device>LinuxFb
<subdriver>VNC, Transformed, MultiSpecifies a subdriver.
<RotX>TransformedSpecifies the rotation of the screen. The valid values of X are 90, 180 and 270.
offset=<x,y>MultiSpecifies the coordinates of a subscreen's top-left corner (by default 0,0).

The QWS_DISPLAY environment variable can also be set using the -display option when running an application. For example:

 myApplication -display "<driver>[:<driver specific options>]...
          [:<display num>]"

Subdrivers and Multiple Drivers

The VNC, Transformed and Multi screen drivers depend on subdrivers. The general syntax for specifying a driver is as follows:

 export QWS_DISPLAY="<driver>[:<subdriver>][:<subdriver options>]...
         [ :<display num>]"

In the case of subdrivers, it is important to add a space between each subdriver and before the display number to separate the various drivers and displays. Note that Multi screen drivers can have several subdrivers. For example:

 export QWS_DISPLAY="Multi: QVFb:0 QVFb:offset=640,0:1 :2"

Note also that the VNC screen driver defaults to a virtual screen driver if no subdriver is specified. In this case the VNC driver accepts a few additional (optional) arguments specifying the size and depth of the default virtual screen:

  • size=<width x height>
  • depth=<value>
  • mmHeight=<physical height in millimeters>
  • mmWidth=<physical width in millimeters>

Example running the VNC screen driver with a virtual screen of size 720x480 with 32 bits per pixel:

 export QWS_DISPLAY="VNC:size=720x480:depth=32"

Example running the VNC screen driver on top of the Linux framebuffer driver:

 export QWS_DISPLAY="VNC:LinuxFb"

In this last example, Qt is using two screen drivers simultaneously, displaying output on both the device's screen and across a network on VNC client displays.

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 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. 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
  4. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  5. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  6. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le blog Digia au hasard

Logo

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.

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.7
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