From 18c1d671371ef8d94506a9a6dd6ee3680ef80fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 21 Jun 2011 17:00:25 +0200 Subject: Made QExposeEvent public and added exposeEvent() in QWindow. This is needed for applications that use QBackingStore directly. --- examples/qpa/windows/window.cpp | 7 +++++-- examples/qpa/windows/window.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'examples') 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: -- cgit v1.2.3