summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-10-25 15:35:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-11-04 10:40:42 +0000
commitbc4f672cc6a3ab07a967dbb88e769e4869ec1fbc (patch)
tree2349690479abe2312dec11bc669528d44cf67994 /src/gui/kernel/qwindow.cpp
parent4df5003ee7b47a55b2a06b69d57c1a2ca4314607 (diff)
Document that QWindow position is relative to its screen's virtualGeometry
Change-Id: I36e14813d0d32aa1b5a30fa0e63e0a3c477acb01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 95e552cf5f..91b5acbd35 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1485,6 +1485,8 @@ void QWindow::setSizeIncrement(const QSize &size)
Sets the geometry of the window, excluding its window frame, to a
rectangle constructed from \a posx, \a posy, \a w and \a h.
+ The geometry is in relation to the virtualGeometry() of its screen.
+
\sa geometry()
*/
void QWindow::setGeometry(int posx, int posy, int w, int h)
@@ -1495,6 +1497,8 @@ void QWindow::setGeometry(int posx, int posy, int w, int h)
/*!
\brief Sets the geometry of the window, excluding its window frame, to \a rect.
+ The geometry is in relation to the virtualGeometry() of its screen.
+
\sa geometry()
*/
void QWindow::setGeometry(const QRect &rect)
@@ -1556,6 +1560,8 @@ QScreen *QWindowPrivate::screenForGeometry(const QRect &newGeometry)
/*!
Returns the geometry of the window, excluding its window frame.
+ The geometry is in relation to the virtualGeometry() of its screen.
+
\sa frameMargins(), frameGeometry()
*/
QRect QWindow::geometry() const
@@ -1582,6 +1588,8 @@ QMargins QWindow::frameMargins() const
/*!
Returns the geometry of the window, including its window frame.
+ The geometry is in relation to the virtualGeometry() of its screen.
+
\sa geometry(), frameMargins()
*/
QRect QWindow::frameGeometry() const
@@ -1614,6 +1622,8 @@ QPoint QWindow::framePosition() const
/*!
Sets the upper left position of the window (\a point) including its window frame.
+ The position is in relation to the virtualGeometry() of its screen.
+
\sa setGeometry(), frameGeometry()
*/
void QWindow::setFramePosition(const QPoint &point)
@@ -1631,6 +1641,8 @@ void QWindow::setFramePosition(const QPoint &point)
/*!
\brief set the position of the window on the desktop to \a pt
+ The position is in relation to the virtualGeometry() of its screen.
+
\sa position()
*/
void QWindow::setPosition(const QPoint &pt)
@@ -1641,6 +1653,8 @@ void QWindow::setPosition(const QPoint &pt)
/*!
\brief set the position of the window on the desktop to \a posx, \a posy
+ The position is in relation to the virtualGeometry() of its screen.
+
\sa position()
*/
void QWindow::setPosition(int posx, int posy)
@@ -1817,8 +1831,9 @@ QScreen *QWindow::screen() const
If the window has been created, it will be recreated on the \a newScreen.
- Note that if the screen is part of a virtual desktop of multiple screens,
- the window can appear on any of the screens returned by QScreen::virtualSiblings().
+ \note If the screen is part of a virtual desktop of multiple screens,
+ the window will not move automatically to \a newScreen. To place the
+ window relative to the screen, use the screen's topLeft() position.
This function only works for top level windows.