From 60294e0aa381419b897317e3eec208d98ca8b4aa Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 11 Dec 2012 12:01:17 +0100 Subject: iOS: implement in QIOSWindow::setVisible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When QWindow is told to show/hide, we need to show/hide the backing UIView as well, otherwise the window will still be visible on screen. Change-Id: I806fdd8bb4afacbbc1c9c7381ba0a31195ee04ac Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.h | 1 + src/plugins/platforms/ios/qioswindow.mm | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h index 4c55249046..3a05901ae7 100644 --- a/src/plugins/platforms/ios/qioswindow.h +++ b/src/plugins/platforms/ios/qioswindow.h @@ -86,6 +86,7 @@ public: void setWindowState(Qt::WindowState state); void handleContentOrientationChange(Qt::ScreenOrientation orientation); + void setVisible(bool visible); GLuint framebufferObject(const QIOSContext &context) const; GLuint colorRenderbuffer(const QIOSContext &context) const; diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 871a046c71..a2901efd1d 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -225,6 +225,12 @@ QIOSWindow::~QIOSWindow() [m_view release]; } +void QIOSWindow::setVisible(bool visible) +{ + QPlatformWindow::setVisible(visible); + [m_view setHidden:!visible]; +} + void QIOSWindow::setGeometry(const QRect &rect) { // If the window is in fullscreen, just bookkeep the requested -- cgit v1.2.3