diff options
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 0a051ae965..38b90fdd73 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -81,6 +81,15 @@ public: void maybeQuitOnLastWindowClosed(); + QPoint globalPosition() const { + Q_Q(const QWindow); + QPoint offset = q->pos(); + for (const QWindow *p = q->parent(); p; p = p->parent()) + offset += p->pos(); + return offset; + } + + QWindow::SurfaceType surfaceType; Qt::WindowFlags windowFlags; QWindow *parentWindow; |