Sur cette page

ToolSeparator QML Type

Permet de séparer un groupe d'éléments d'une barre d'outils des éléments adjacents. En savoir plus...

Import Statement: import QtQuick.Controls
Inherits:

Control

Propriétés

Description détaillée

ToolSeparator permet de distinguer visuellement des groupes d'éléments dans une barre d'outils en les séparant par une ligne. Il peut être utilisé dans des barres d'outils horizontales ou verticales en définissant la propriété « orientation » respectivement sur « Qt.Vertical » ou « Qt.Horizontal ».

Séparateur d'outils séparant les boutons de la barre d'outils

ToolBar {
    RowLayout {
        anchors.fill: parent

        ToolButton {
            text: qsTr("Action 1")
        }
        ToolButton {
            text: qsTr("Action 2")
        }

        ToolSeparator {}

        ToolButton {
            text: qsTr("Action 3")
        }
        ToolButton {
            text: qsTr("Action 4")
        }

        ToolSeparator {}

        ToolButton {
            text: qsTr("Action 5")
        }
        ToolButton {
            text: qsTr("Action 6")
        }

        Item {
            Layout.fillWidth: true
        }
    }
}

Voir également Personnalisation des contrôlesToolSeparator et Separator.

Documentation sur les propriétés

horizontal : bool [read-only]

Cette propriété est vérifiée si orientation est égal à Qt.Horizontal.

Elle est utile pour personnaliser ToolSeparator.

Voir également orientation et vertical.

orientation : enumeration

Cette propriété définit l'orientation du séparateur d'outils.

Valeurs possibles :

ConstanteDescription
Qt.HorizontalUn séparateur horizontal est utilisé dans une barre d'outils verticale.
Qt.VerticalUn séparateur vertical est utilisé dans une barre d'outils horizontale. (par défaut)

vertical : bool [read-only]

Cette propriété est vérifiée lorsque orientation est égal à Qt.Vertical.

Elle est utile pour personnaliser ToolSeparator.

Voir également orientation et horizontal.

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