Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QPaintEvent Class

TheQPaintEvent class contains event parameters for paint events.More...

Header:#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 fromQEvent

Additional Inherited Members

  • 1 property inherited fromQEvent
  • 1 static public member inherited fromQEvent

Detailed Description

TheQPaintEvent 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 aregion() that needs to be updated, and arect() that is the bounding rectangle of that region. Both are provided because many widgets can't make much use ofregion(), andrect() can be much faster thanregion().boundingRect().

Automatic Clipping

Painting is clipped toregion() 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 aQPainter used to draw on the paint device.

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

See alsoQPainter,QWidget::update(),QWidget::repaint(), andQWidget::paintEvent().

Member Function Documentation

QPaintEvent::QPaintEvent(constQRegion & paintRegion)

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

QPaintEvent::QPaintEvent(constQRect & paintRect)

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

constQRect & QPaintEvent::rect() const

Returns the rectangle that needs to be updated.

See alsoregion() andQPainter::setClipRect().

constQRegion & QPaintEvent::region() const

Returns the region that needs to be updated.

See alsorect() andQPainter::setClipRegion().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp