QPaintDeviceWindow 类

方便子类化的 QWindow 也是 QPaintDevice . 更多...

头: #include <QPaintDeviceWindow>
qmake: QT += gui
Since: Qt 5.4
继承: QWindow and QPaintDevice
继承者:

QOpenGLWindow and QRasterWindow

公共函数

void update (const QRect & rect )
void update (const QRegion & region )

公共槽

void update ()

保护函数

virtual void paintEvent (QPaintEvent * event )

额外继承成员

详细描述

方便子类化的 QWindow 也是 QPaintDevice .

QPaintDeviceWindow is like a regular QWindow , with the added functionality of being a paint device too. Whenever the content needs to be updated, the virtual paintEvent () function is called. Subclasses, that reimplement this function, can then simply open a QPainter on the window.

注意: 此类不能直接被用于应用程序。它宁愿充当子类的基,像 QOpenGLWindow .

另请参阅 QOpenGLWindow .

成员函数文档编制

[virtual protected] void QPaintDeviceWindow:: paintEvent ( QPaintEvent * event )

处理描绘事件传入的 event 参数。

The default implementation does nothing. Reimplement this function to perform painting. If necessary, the dirty area is retrievable from the event .

void QPaintDeviceWindow:: update (const QRect & rect )

Marks the rect of the window as dirty and schedules a repaint.

注意: Subsequent calls to this function before the next paint event will get ignored, but rect is added to the region to update.

注意: For non-exposed windows the update is deferred until the window becomes exposed again.

void QPaintDeviceWindow:: update (const QRegion & region )

Marks the region of the window as dirty and schedules a repaint.

注意: Subsequent calls to this function before the next paint event will get ignored, but region is added to the region to update.

注意: For non-exposed windows the update is deferred until the window becomes exposed again.

[slot] void QPaintDeviceWindow:: update ()

Marks the entire window as dirty and schedules a repaint.

注意: Subsequent calls to this function before the next paint event will get ignored.

注意: For non-exposed windows the update is deferred until the window becomes exposed again.