iOS: implement in QIOSWindow::setVisible

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ø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2012-12-11 12:01:17 +01:00 committed by Tor Arne Vestbø
parent d07bd1b22f
commit 60294e0aa3
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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