QPaintDeviceWindow Class
Convenience subclass of QWindow that is also a QPaintDevice. More...
Header: | #include <QPaintDeviceWindow> |
qmake: | QT += gui |
Since: | Qt 5.4 |
Inherits: | QWindow and QPaintDevice |
Inherited By: |
This class was introduced in Qt 5.4.
Public Functions
- 80 public functions inherited from QWindow
- 14 public functions inherited from QPaintDevice
- 30 public functions inherited from QObject
- 6 public functions inherited from QSurface
Public Slots
void | update() |
Protected Functions
virtual void | paintEvent(QPaintEvent *event) |
- 18 protected functions inherited from QWindow
- 1 protected function inherited from QPaintDevice
- 9 protected functions inherited from QObject
Related Non-Members
typedef | QObjectList |
QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
T | qobject_cast(QObject *object) |
T | qobject_cast(const QObject *object) |
Macros
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Q_CLASSINFO(Name, Value) | |
Q_DISABLE_COPY(Class) | |
Q_DISABLE_COPY_MOVE(Class) | |
Q_DISABLE_MOVE(Class) | |
Q_EMIT | |
Q_ENUM(...) | |
Q_ENUM_NS(...) | |
Q_FLAG(...) | |
Q_FLAG_NS(...) | |
Q_GADGET | |
Q_INTERFACES(...) | |
Q_INVOKABLE | |
Q_NAMESPACE | |
Q_OBJECT | |
Q_PROPERTY(...) | |
Q_REVISION | |
Q_SET_OBJECT_NAME(Object) | |
Q_SIGNAL | |
Q_SIGNALS | |
Q_SLOT | |
Q_SLOTS |
Additional Inherited Members
- 16 properties inherited from QWindow
- 1 property inherited from QObject
- 18 signals inherited from QWindow
- 2 signals inherited from QObject
- 1 static public member inherited from QWindow
- 9 static public members inherited from QObject
Detailed Description
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.
See also QOpenGLWindow.
Member Function Documentation
[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.
[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.