summaryrefslogtreecommitdiffstats
path: root/examples/qpa/windows/window.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <[email protected]>2011-06-21 17:00:25 +0200
committerSamuel Rødal <[email protected]>2011-06-22 09:41:10 +0200
commit18c1d671371ef8d94506a9a6dd6ee3680ef80fd3 (patch)
treef70ea0d730e39b7081b184778180eb616a670773 /examples/qpa/windows/window.cpp
parentdc40eaba1f2fa5db9e4bb56f3e624cd10fd6dc6b (diff)
Made QExposeEvent public and added exposeEvent() in QWindow.
This is needed for applications that use QBackingStore directly.
Diffstat (limited to 'examples/qpa/windows/window.cpp')
-rw-r--r--examples/qpa/windows/window.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/qpa/windows/window.cpp b/examples/qpa/windows/window.cpp
index 1c09c6b3da6..bbfc6a31163 100644
--- a/examples/qpa/windows/window.cpp
+++ b/examples/qpa/windows/window.cpp
@@ -38,8 +38,6 @@ Window::Window(QWindow *parent)
m_image.fill(colorTable[m_backgroundColorIndex % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
m_lastPos = QPoint(-1, -1);
-
- render();
}
void Window::mousePressEvent(QMouseEvent *event)
@@ -71,6 +69,11 @@ void Window::mouseReleaseEvent(QMouseEvent *event)
render();
}
+void Window::exposeEvent(QExposeEvent *)
+{
+ render();
+}
+
void Window::resizeEvent(QResizeEvent *)
{
QImage old = m_image;