summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2022-12-09 10:46:44 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2023-01-04 00:09:50 +0100
commitb1bb732639be849b225db635a725b3c19881380c (patch)
tree650f6dd6da39d844e633ae97e89023fe9d9cd7de /src/gui/kernel/qwindow.cpp
parentf091026be1deb4b4a90f32585b9b22f97209866a (diff)
Doc: note QWindow::winId() will cause platform window creation
Worth it to emphasize this, as such a side effect from a const accessor may well be unexpected. Change-Id: I0b70d81927e0b66799cbe736ce5d488e2ec77ce0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 29976613aa..313b67ad61 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -665,7 +665,7 @@ bool QWindow::isVisible() const
into an actual native surface. However, the window remains hidden until setVisible() is called.
Note that it is not usually necessary to call this function directly, as it will be implicitly
- called by show(), setVisible(), and other functions that require access to the platform
+ called by show(), setVisible(), winId(), and other functions that require access to the platform
resources.
Call destroy() to free the platform resources if necessary.
@@ -681,6 +681,8 @@ void QWindow::create()
/*!
Returns the window's platform id.
+ \note This function will cause the platform window to be created if it is not already.
+
For platforms where this id might be useful, the value returned
will uniquely represent the window inside the corresponding screen.