WindowContainer QML Type
Permet d'intégrer des QWindows arbitraires dans une scène Qt Quick. Plus d'informations...
| Import Statement: | import QtQuick |
| Since: | Qt 6.8 |
| Inherits: |
Propriétés
- window : QWindow
Description détaillée
La fenêtre devient un enfant de la fenêtre de l'élément, dont la position, la taille, l'ordre z, etc. sont gérés par l'élément.
Les éléments frères dont l'ordre z est supérieur à celui du conteneur de la fenêtre ne chevaucheront pas automatiquement la fenêtre intégrée, étant donné que la fenêtre se trouve au-dessus de la scène Qt Quick. Pour contourner ce problème, placez les éléments frères à l'intérieur de leur propre fenêtre enfant dédiée :
Item { id: someItem WindowContainer { window: foreignWindow } WindowContainer { window: Window { Item { id: siblingItem } } } }
De même, les éléments enfants du conteneur de la fenêtre ne chevaucheront pas automatiquement la fenêtre intégrée. Pour contourner ce problème, placez l'élément enfant à l'intérieur d'une fenêtre enfant dédiée.
Item { id: someItem WindowContainer { id: windowContainer window: foreignWindow WindowContainer { window: Window { Item { id: childItem } } } } }
Remarque : le conteneur de fenêtre ne fonctionne pas avec QQuickWidget, QQuickWindow::setRenderTarget(), QQuickRenderControl, ou d'autres fonctionnalités similaires.
Voir également parent().
Documentation sur les propriétés
window : QWindow
Cette propriété contient la fenêtre à intégrer.
© 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.