ToolSeparator QML Type
将工具栏中的一组项目与相邻项目分开。更多
Import Statement: | import QtQuick.Controls |
Inherits: |
属性
- horizontal : bool
- orientation : enumeration
- vertical : bool
详细说明
ToolSeparator 用于用直线分隔工具栏中的各组项目,从而在视觉上将它们区分开来。通过将orientation 属性分别设置为Qt.Vertical
或Qt.Horizontal
,可将其用于水平或垂直工具栏。
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 } } }
属性文档
horizontal : bool |
orientation : enumeration |
该属性表示工具分隔符的方向。
可能的值:
常量 | 说明 |
---|---|
Qt.Horizontal | 垂直工具栏中使用水平分隔线。 |
Qt.Vertical | 垂直分隔线用于水平工具栏。(默认值) |
vertical : bool |
© 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.