HomeHome

Classes - Annotated - Tree - Functions - Home - Structure Qte

QPaintEvent Class Reference


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

#include <qevent.h>

Inherits QEvent.

List of all member functions.

Public Members


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 a part of a widget is exposed because an overlying widget is moved away.

The event handler QWidget::paintEvent() receives paint events.

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

Examples: trivial/trivial.cpp splitter/splitter.cpp qtimage/qtimage.cpp progress/progress.cpp picture/picture.cpp xform/xform.cpp drawlines/connect.cpp qmag/qmag.cpp desktop/desktop.cpp grapher/grapher.cpp drawdemo/drawdemo.cpp


Member Function Documentation

QPaintEvent::QPaintEvent ( const QRect & paintRect, bool erased=TRUE = TRUE )

Constructs a paint event object with the rectangle that should be updated.

QPaintEvent::QPaintEvent ( const QRegion & paintRegion, bool erased=TRUE = TRUE )

Constructs a paint event object with the region that should be updated.

bool QPaintEvent::erased () const

Returns whether the paint event region (or rectangle) has been erased with the widget's background.

const QRect & QPaintEvent::rect () const

Returns the rectangle that should be updated.

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

Examples: trivial/trivial.cpp splitter/splitter.cpp qtimage/qtimage.cpp progress/progress.cpp grapher/grapher.cpp

const QRegion & QPaintEvent::region () const

Returns the region that should be updated.

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


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.


Copyright © 2005 TrolltechTrademarks
Qt version 2.3.10