- Qt 6.11
- Qt Quick
- QML Types
- WindowContainer
- Qt 6.11.1 Reference Documentation

# WindowContainer QML Type

Allows embedding arbitrary QWindows into a Qt Quick scene. More...

Import Statement: | `import QtQuick`
Since: | Qt 6.8
Inherits: | Item

- List of all members, including inherited members

## Properties

- window : QWindow

## Detailed Description

The window will become a child of the item's window, with its position, size, z-order, etc. managed by the item.

Sibling items with a higher z-order than the window container will not automatically overlap the embedded window, as the window lives on top of the Qt Quick scene. To work around this, place the sibling items inside their own dedicated child window:

     Item {
         id: someItem
         WindowContainer {
             window: foreignWindow
         }
         WindowContainer {
             window: Window {
                 Item {
                     id: siblingItem
                 }
             }
         }
     }

Similarly, child Items of the window container will not automatically overlap the embedded window. To work around this, place the child item inside a dedicated child window.

     Item {
         id: someItem
         WindowContainer {
             id: windowContainer
             window: foreignWindow
             WindowContainer {
                 window: Window {
                     Item {
                         id: childItem
                     }
                 }
             }
         }
     }

Note: The window container does not interoperate with QQuickWidget, QQuickWindow::setRenderTarget(), QQuickRenderControl, or similar functionality.

See also parent().

## Property Documentation

### window : QWindow

This property holds the window to embed.