diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-11-21 17:28:53 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-22 22:36:53 +0100 |
commit | a4e1c15b16ef263f908ae1b5d9d8b2b8c1e21ff0 (patch) | |
tree | 8a878f366adf31e9285e87fcaab0ef2f4ef03ef5 | |
parent | c38225229d047eeb52a09150dff9985f0547b13f (diff) | |
download | qtbase-a4e1c15b16ef263f908ae1b5d9d8b2b8c1e21ff0.tar.gz |
iOS: Deliver resize events synchronously after setGeometry for QtWidgets
QWidget::show_sys() assumes synchronous geometry behavior by trying to
resize both the platform window and the backing store if the widget's
view of what the geometry is doesn't match the platform window's.
The problem with that is that it's the widget which is not up to date,
not the window, as the widget is not waiting for resize events before
applying any resize logic. Instead of trying to fix widgets, we throw
our hands in the air and give QtWidgets the synchronous behavior it
assumes from the platform.
Change-Id: I1b9241b9b13df661dc7f41c4cb8ecd02f5572256
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r-- | src/plugins/platforms/ios/qioswindow.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index d4e656c390..d453058b10 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -530,6 +530,9 @@ void QIOSWindow::applyGeometry(const QRect &rect) // iOS will automatically trigger -[layoutSubviews:] for resize, // but not for move, so we force it just in case. [m_view setNeedsLayout]; + + if (window()->inherits("QWidgetWindow")) + [m_view layoutIfNeeded]; } void QIOSWindow::setWindowState(Qt::WindowState state) |