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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QPaintEvent Class

The QPaintEvent class contains event parameters for paint events. More...

 #include <QPaintEvent>

Inherits: QEvent.

Public Functions

QPaintEvent(const QRegion & paintRegion)
QPaintEvent(const QRect & paintRect)
const QRect & rect() const
const QRegion & region() const
  • 6 public functions inherited from QEvent

Additional Inherited Members

  • 1 property inherited from QEvent
  • 1 static public member inherited from QEvent

Detailed Description

The QPaintEvent class contains event parameters for paint events.

Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved.

The event contains a region() that needs to be updated, and a rect() that is the bounding rectangle of that region. Both are provided because many widgets can't make much use of region(), and rect() can be much faster than region().boundingRect().

Automatic Clipping

Painting is clipped to region() during the processing of a paint event. This clipping is performed by Qt's paint system and is independent of any clipping that may be applied to a QPainter used to draw on the paint device.

As a result, the value returned by QPainter::clipRegion() on a newly-constructed QPainter will not reflect the clip region that is used by the paint system.

See also QPainter, QWidget::update(), QWidget::repaint(), and QWidget::paintEvent().

Member Function Documentation

QPaintEvent::QPaintEvent(const QRegion & paintRegion)

Constructs a paint event object with the region that needs to be updated. The region is specified by paintRegion.

QPaintEvent::QPaintEvent(const QRect & paintRect)

Constructs a paint event object with the rectangle that needs to be updated. The region is specified by paintRect.

const QRect & QPaintEvent::rect() const

Returns the rectangle that needs to be updated.

See also region() and QPainter::setClipRect().

const QRegion & QPaintEvent::region() const

Returns the region that needs to be updated.

See also rect() and QPainter::setClipRegion().

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 5.0-snapshot
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