ToolBar QML Type
컨텍스트에 따라 동작이 달라지는 컨트롤을 담는 컨테이너입니다. 더 보기...
| Import Statement: | import QtQuick.Controls |
| Inherits: |
속성
- position : enumeration
상세 설명
ToolBar는 탐색 버튼이나 검색 필드와 같이 애플리케이션 전반에 걸쳐 사용되며 상황에 따라 달라지는 동작과 컨트롤을 포함하는 컨테이너입니다. ToolBar는 일반적으로 ApplicationWindow 의 header 또는 footer 로 사용됩니다.
ToolBar는 자체 레이아웃을 제공하지 않으며, 예를 들어 RowLayout 를 생성하는 등의 방법으로 내용을 배치해야 합니다. ToolBar 내에 단일 항목만 사용되는 경우, 포함된 항목의 암시적 크기에 맞게 크기가 조정됩니다. 따라서 레이아웃과 함께 사용하기에 특히 적합합니다.

ApplicationWindow {
visible:true
header: ToolBar {
RowLayout {
anchors.fill: parent
ToolButton {
text: qsTr("‹")
onClicked: stack.pop()
}
Label {
text: "Title"
elide: Label.ElideRight
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
Layout.fillWidth: true
}
ToolButton {
text: qsTr("⋮")
onClicked: menu.open()
}
}
}
StackView {
id: stack
anchors.fill: parent
}
}ApplicationWindow, ToolButton, ToolBar 사용자 정의 및 컨테이너 컨트롤항목도 참조하십시오 .
속성 설명서
position : enumeration
이 속성은 툴바의 위치를 지정합니다.
참고: 툴바가 ApplicationWindow 또는 Page 의 헤더나 푸터로 지정된경우 , 적절한 위치가 자동으로 설정됩니다.
사용 가능한 값:
| 상수 | 설명 |
|---|---|
ToolBar.Header | 툴바가 창 또는 페이지 헤더로서 상단에 위치합니다. |
ToolBar.Footer | 툴바가 하단에 위치하며, 창 또는 페이지 바닥글 역할을 합니다. |
기본값은 스타일에 따라 다릅니다.
ApplicationWindow::header, ApplicationWindow::footer, Page::header 및 Page::footer도 참조하십시오 .
© 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.