diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-14 13:00:02 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-14 19:19:38 +0200 |
commit | e95e9c28f07e22ea76a7a5521c090a785133dbfd (patch) | |
tree | 2c416de87604cc1a15286a7385dbc4004d2a27f0 /src/widgets/kernel/qwidget.cpp | |
parent | c179549a7402d70ed4be5ab3af5939667f4238a1 (diff) |
QWidget: Don't rely on topextra to determine if window is top level
Doing so results in bailing out early for a widget that hasn't been
shown yet, or otherwise resulted in creating extra and topextra,
which means the normalGeometry will not reflect the widget's geometry.
Pick-to: 6.2
Change-Id: Ieb85e9a6109ae34fe20d79e3c12f4517f827a590
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 2534a7aeba..d5a0e92fac 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -3668,7 +3668,7 @@ QPoint QWidget::pos() const QRect QWidget::normalGeometry() const { Q_D(const QWidget); - if (!d->extra || !d->extra->topextra) + if (!isWindow()) return QRect(); if (!isMaximized() && !isFullScreen()) |