From b5bdd31de41cb5e6d6abedce79864fc01d8d4984 Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Wed, 12 Dec 2012 17:18:28 +0100 Subject: Implement XEmbed protocol Add a static QWindow::fromWinId(WId id) constructor which can be used to create a QWindow object representing windows created by other processes. Then, QWindow::setParent() can be used to embed a window into a foreign window socket and QWindow::setTransientParent() to stick the current window on top of a foreign window. The changes in the QtWidgets module ensure that the focus chain (TAB navigation) correctly works when a QtWidgets-based window is embedded into another application. As far as the platform implementation is concerned, this commit only implements the embedding functionality in the XCB plugin. So, this is roughly equivalent to the Qt4 QX11EmbedWidget functionality. Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7 Reviewed-by: Gunnar Sletta --- src/corelib/global/qnamespace.h | 1 + src/corelib/global/qnamespace.qdoc | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 41bca2a443..a33c50a041 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -284,6 +284,7 @@ public: SplashScreen = ToolTip | Dialog, Desktop = 0x00000010 | Window, SubWindow = 0x00000012, + ForeignWindow = 0x00000020 | Window, WindowType_Mask = 0x000000ff, MSWindowsFixedSizeDialogHint = 0x00000100, diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 8ec206a572..02d00c213b 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1966,6 +1966,10 @@ \value SubWindow Indicates that this widget is a sub-window, such as a QMdiSubWindow widget. + \value ForeignWindow Indicates that this window object is a handle + representing a native platform window created by + another process or by manually using native code. + There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows: -- cgit v1.2.3