summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index afbff2ad5d..f6a1260d9d 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -70,7 +70,7 @@ QPlatformWindow::~QPlatformWindow()
}
/*!
- Returnes the window which belongs to the QPlatformWindow
+ Returns the window which belongs to the QPlatformWindow
*/
QWindow *QPlatformWindow::window() const
{
@@ -79,6 +79,15 @@ QWindow *QPlatformWindow::window() const
}
/*!
+ Returns the parent platform window (or 0 if orphan).
+*/
+QPlatformWindow *QPlatformWindow::parent() const
+{
+ Q_D(const QPlatformWindow);
+ return d->window->parent() ? d->window->parent()->handle() : 0;
+}
+
+/*!
This function is called by Qt whenever a window is moved or the window is resized. The resize
can happen programatically(from ie. user application) or by the window manager. This means that
there is no need to call this function specifically from the window manager callback, instead