Sur cette page

XdgOutputManagerV1 QML Type

Fournit une extension permettant de décrire les sorties dans une optique orientée bureau. En savoir plus…

Import Statement: import QtWayland.Compositor.XdgShell
In C++: QWaylandXdgOutputManagerV1

Description détaillée

L'extension XdgOutputManagerV1 permet à un compositeur de décrire les sorties d'une manière plus conforme au concept de sortie sur les systèmes orientés bureau.

Certaines informations peuvent ne pas avoir de sens dans d'autres applications, telles que les systèmes IVI.

En règle générale, l'espace global du compositeur sur un système de bureau est constitué d'un ensemble contigu ou chevauchant de régions rectangulaires.

XdgOutputManagerV1 correspond à l’interface Wayland, zxdg_output_manager_v1.

Pour intégrer les fonctionnalités de cette extension dans un compositeur, créez une instance du composant XdgOutputManagerV1, ajoutez-la à la liste des extensions prises en charge par le compositeur, puis associez chaque XdgOutputV1 à son WaylandOutput:

import QtWayland.Compositor

WaylandCompositor {
    XdgOutputManagerV1 {
        WaylandOutput {
            id: output1

            position: Qt.point(0, 0)
            window: Window {}

            XdgOutputV1 {
                name: "WL-1"
                logicalPosition: output1.position
                logicalSize: Qt.size(output1.geometry.width / output1.scaleFactor,
                                     output1.geometry.height / output1.scaleFactor)
            }
        }

        WaylandOutput {
            id: output2

            position: Qt.point(800, 0)
            window: Window {}

            XdgOutputV1 {
                name: "WL-2"
                logicalPosition: output2.position
                logicalSize: Qt.size(output2.geometry.width / output2.scaleFactor,
                                     output2.geometry.height / output2.scaleFactor)
            }
        }
    }
}

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