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 ()

靜態公共成員

const QMetaObject staticMetaObject

保護函數

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.