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>
This commit is contained in:
parent
c38225229d
commit
a4e1c15b16
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user