summaryrefslogtreecommitdiffstats
path: root/examples/qpa
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-06-21 17:00:25 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-06-22 09:41:10 +0200
commit18c1d671371ef8d94506a9a6dd6ee3680ef80fd3 (patch)
treef70ea0d730e39b7081b184778180eb616a670773 /examples/qpa
parentdc40eaba1f2fa5db9e4bb56f3e624cd10fd6dc6b (diff)
Made QExposeEvent public and added exposeEvent() in QWindow.
This is needed for applications that use QBackingStore directly.
Diffstat (limited to 'examples/qpa')
-rw-r--r--examples/qpa/windows/window.cpp7
-rw-r--r--examples/qpa/windows/window.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/qpa/windows/window.cpp b/examples/qpa/windows/window.cpp
index 1c09c6b3da..bbfc6a3116 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;
diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h
index f716145f94..546cf67bce 100644
--- a/examples/qpa/windows/window.h
+++ b/examples/qpa/windows/window.h
@@ -13,6 +13,7 @@ protected:
void keyPressEvent(QKeyEvent *);
+ void exposeEvent(QExposeEvent *);
void resizeEvent(QResizeEvent *);
private: