QPaintEvent(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QPaintEvent πŸ’– β€” aka QPaintEvent(3qt), the manual page for the cutest little event params in Qt 3

okay so. bestie. imagine a widget that needs to redraw itself. that's it. that's the whole vibe of this class. welcome to the group chat πŸ’…


✨ NAME ✨

QPaintEvent β€” event parameters for paint events 🎨


🌸 SYNOPSIS 🌸

#include <qevent.h>

Inherits QEvent. yes she's a QEvent girlie, she's in the family 🫢

πŸŽ€ Public Members πŸŽ€

QPaintEvent ( const QRegion & paintRegion, bool erased = TRUE )
QPaintEvent ( const QRect & paintRect, bool erased = TRUE )
QPaintEvent ( const QRegion & paintRegion, const QRect & paintRect, bool erased = TRUE )
const QRect & rect () const
const QRegion & region () const
bool erased () const

three constructors, three getters, zero drama. iconic behavior honestly πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

The QPaintEvent class contains event parameters for paint events. that's her whole job and she does it flawlessly ✨

Paint events get sent to widgets that need to update themselves β€” for instance when part of a widget is exposed because a covering widget is moved. so rude of that covering widget but okay 😭

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(). ngl that's just efficiency queen behavior. Painting is clipped to region() during processing of a paint event. no cap 🎯

The erased() function returns TRUE if the region() has been cleared to the widget's background (see QWidget::backgroundMode()), and FALSE if the region's contents are arbitrary. basically: "is this a clean slate or is it chaos" πŸ’€

See also QPainter, QWidget::update(), QWidget::repaint(), QWidget::paintEvent(), QWidget::backgroundMode, QRegion, and Event Classes. the whole friend group πŸ«‚


πŸ’… MEMBER FUNCTION DOCUMENTATION πŸ’…

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

Constructs a paint event object with the region that should be updated. The region is given by paintRegion. If erased is TRUE the region will be cleared before repainting. fresh start energy 🌈

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

Constructs a paint event object with the rectangle that should be updated. The region is also given by paintRect. If erased is TRUE the region will be cleared before repainting. yep, the rect is the region here, don't overthink it bestie πŸ“

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

Constructs a paint event object with the rectangle paintRect that should be updated. The region is given by paintRegion. If erased is TRUE the region will be cleared before repainting. this is the "you give me both" version, high maintenance and we love her for it πŸ’œ

bool QPaintEvent::erased () const

Returns TRUE if the paint event region (or rectangle) has been erased with the widget's background; otherwise returns FALSE. simple. clean. a yes/no icon ⭐

const QRect & QPaintEvent::rect () const

Returns the rectangle that should be updated.

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

Examples:

okay so the original page lists an Examples section here and it is literally empty. no example code. nothing. an empty dance floor πŸ’€ not me keeping the heading anyway because the rules say every detail stays. so: Examples: β€” and that's all she wrote. πŸ•³οΈ

const QRegion & QPaintEvent::region () const

Returns the region that should be updated.

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

Examples:

and again β€” Examples: with absolutely nothing under it. two empty example sections, twin ghosts πŸ‘»πŸ‘»

🌟 SEE ALSO 🌟


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. πŸ“œ


πŸ™ˆ AUTHOR πŸ™ˆ

Generated automatically from the source code. (so no, a human did not lovingly hand-craft this one β€” a script did, and honestly? respect 🫑)


πŸ’€ BUGS πŸ’€

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. 🫢 (fr fr, good bug reports are the love language of maintainers)

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. ⚠️ so yes β€” this whole man page is the "unofficial fan edit" of the docs, treat it accordingly

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qpaintevent.3qt) and the Qt version (3.3.8). don't be shy, include the deets, it's giving considerate πŸ’Œ


and that's the whole page bestie!! πŸŽ‰ this one came from Trolltech AS, dated 2 February 2007, and it's the QPaintEvent(3qt) manual page from the Qt 3.3.8 era β€” go forth and repaint responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from