このページでは

WindowContainer QML Type

Qt Quick のシーンに任意のQWindowを埋め込むことができます。詳細...

Import Statement: import QtQuick
Since: Qt 6.8
Inherits:

Item

プロパティ

詳細説明

このウィンドウは、アイテムのウィンドウの子となり、その位置、サイズ、Z順序などはアイテムによって管理されます。

ウィンドウコンテナよりもZ順序が高い同階層のアイテムは、ウィンドウがQt Quick シーンの最前面に表示されるため、埋め込まれたウィンドウと自動的に重なることはありません。これを回避するには、同階層のアイテムを専用の子ウィンドウ内に配置してください:

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

同様に、ウィンドウコンテナの子アイテムも、埋め込まれたウィンドウと自動的に重なることはありません。これを回避するには、その子アイテムを専用の子ウィンドウ内に配置してください。

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

注:ウィンド ウコンテナは 、QQuickWidget 、QQuickWindow::setRenderTarget()、QQuickRenderControl 、および類似の機能とは相互運用されません。

parent()も参照してください 。

プロパティのドキュメント

window : QWindow

このプロパティには、埋め込むウィンドウが格納されています。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.