summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-12 17:09:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-15 14:41:33 +0200
commit3b1db5daadab9cac75b9727880fad2e38a35387f (patch)
treed9997fa69db7958c92e91f65a0533e507f19344d
parent5bb71e60fb5a829a8e6beb424be48cf1bb32cdfa (diff)
downloadqtdoc-3b1db5daadab9cac75b9727880fad2e38a35387f.tar.gz
Add window embedding platform documentation
Change-Id: If47518a560a12a8af38019ab105240011a1ba876 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--doc/src/platformintegration/platformintegration.qdoc18
-rw-r--r--doc/src/platformintegration/platformintegration.qdocconf2
2 files changed, 19 insertions, 1 deletions
diff --git a/doc/src/platformintegration/platformintegration.qdoc b/doc/src/platformintegration/platformintegration.qdoc
index 91b7dc57..54d6b594 100644
--- a/doc/src/platformintegration/platformintegration.qdoc
+++ b/doc/src/platformintegration/platformintegration.qdoc
@@ -58,6 +58,24 @@
\section1 Window Embedding
+ Windows created by the underlying platform APIs may be used as both
+ parent containers for Qt windows, or embedded into Qt windows as child
+ windows.
+
+ The former is useful if the application is mainly written using the native
+ platform APIs, but where parts of the application uses Qt, for example
+ to draw a specialized UI. To embed Qt into the window hierarchy of the
+ native application, use QWindow::winId() to get the native handle for
+ the Qt window, and then use the native APIs to re-parent the window
+ into the native UI.
+
+ The latter is useful if the native platform, or another toolkit, exposes
+ a specialized control as a native window. By using QWindow::fromWinId()
+ to wrap the native window handle in a QWindow, the window can then be
+ re-parented into the Qt window hierarchy as any other QWindow. To re-parent
+ this QWindow into a Qt Widget based UI, use the widgets-specific
+ QWidget::createWindowContainer() function.
+
\section1 Native Interfaces
\section1 Platform Support
diff --git a/doc/src/platformintegration/platformintegration.qdocconf b/doc/src/platformintegration/platformintegration.qdocconf
index b0229458..42914d3c 100644
--- a/doc/src/platformintegration/platformintegration.qdocconf
+++ b/doc/src/platformintegration/platformintegration.qdocconf
@@ -6,7 +6,7 @@ navigation.landingpage = "Platform Integration"
description = "Integrating Qt with the native platform"
version = $QT_VERSION
-depends += qtcore qtgui qtdoc
+depends += qtcore qtgui qtwidgets qtdoc
sourcedirs = .
headerdirs = .