WindowContainer QML Type

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

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
                }
            }
        }
    }
}

注意: ウィンドウコンテナは、QQuickWidgetQQuickWindow::setRenderTarget()、QQuickRenderControl 、または同様の機能とは相互運用しません。

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

プロパティ Documentation

window : QWindow

このプロパティは、埋め込むウィンドウを保持します。


© 2025 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.