QPaintDeviceWindow Class

Convenience subclass of QWindow that is also a QPaintDevice. 更多...

头文件: #include <QPaintDeviceWindow>
qmake: QT += gui
开始支持版本: Qt 5.4
基类: QWindow and QPaintDevice
派生类:

QOpenGLWindow and QRasterWindow

公有函数

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

公有槽函数

void update()
  • 22 个公有槽函数继承自 QWindow
  • 1 个公有槽函数继承自 QObject

受保护的函数

virtual void paintEvent(QPaintEvent *event)
  • 18 个受保护的函数继承自 QWindow
  • 1 个受保护的函数继承自 QPaintDevice
  • 9 个受保护的函数继承自 QObject

其他继承的成员

详细描述

Convenience subclass of QWindow that is also a 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.

Note: This class cannot directly be used in applications. It rather serves as a base for subclasses like QOpenGLWindow.

参见 QOpenGLWindow.

成员函数

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

Handles paint events passed in the event parameter.

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.

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

Note: 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.

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

Note: 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.

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

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