ToolBar QML Type

상황에 맞는 컨트롤을 위한 컨테이너입니다. 더 보기...

Import Statement: import QtQuick.Controls
Inherits:

Pane

속성

상세 설명

도구 모음은 탐색 버튼 및 검색 필드와 같은 애플리케이션 전체 및 상황에 맞는 동작과 컨트롤이 담긴 컨테이너입니다. ToolBar는 일반적으로 header 또는 footerApplicationWindow 로 사용됩니다.

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, 도구 모음 사용자 지정하기컨테이너 컨트롤을참조하세요 .

속성 문서

position : enumeration

이 속성은 툴바의 위치를 유지합니다.

참고: 툴바가 ApplicationWindow 또는 Page 의 머리글 또는 바닥글로 할당된 경우 적절한 위치가 자동으로 설정됩니다.

가능한 값

Constant설명
ToolBar.Header툴바가 창 또는 페이지 헤더로 상단에 있습니다.
ToolBar.Footer도구 모음은 창 또는 페이지 바닥글의 맨 아래에 있습니다.

기본값은 스타일별로 다릅니다.

ApplicationWindow::header, ApplicationWindow::footer, Page::header, Page::footer참조하세요 .


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