QPaintDeviceWindow Class
Convenience subclass of QWindow that is also a QPaintDevice. 更多...
头文件: | #include <QPaintDeviceWindow> |
qmake: | QT += gui |
开始支持版本: | Qt 5.4 |
基类: | QWindow and QPaintDevice |
派生类: |
公有函数
- 80 个公有函数继承自 QWindow
- 14 个公有函数继承自 QPaintDevice
- 32 个公有函数继承自 QObject
- 6 个公有函数继承自 QSurface
公有槽函数
void | update() |
受保护的函数
virtual void | paintEvent(QPaintEvent *event) |
- 18 个受保护的函数继承自 QWindow
- 1 个受保护的函数继承自 QPaintDevice
- 9 个受保护的函数继承自 QObject
其他继承的成员
- 16 个属性继承自 QWindow
- 1 个属性继承自 QObject
- 18 个信号继承自 QWindow
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 1 个静态公有成员继承自 QWindow
- 10 个静态公有成员继承自 QObject
- 2 个受保护的变量继承自 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 ®ion)
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.