PageIndicator QML Type

현재 활성화된 페이지를 표시합니다. 더 보기...

Import Statement: import QtQuick.Controls
Inherits:

Control

속성

상세 설명

PageIndicator는 여러 페이지로 구성된 컨테이너에서 현재 활성 페이지를 표시하는 데 사용됩니다. PageIndicator는 페이지를 표시하는 델리게이트 항목으로 구성됩니다.

Column {
    StackLayout {
        id: stackLayout

        Page {
            // ...
        }
        Page {
            // ...
        }
        Page {
            // ...
        }
    }

    PageIndicator {
        currentIndex: stackLayout.currentIndex
        count: stackLayout.count
    }
}

SwipeView, 페이지 표시기 사용자 지정하기표시기 컨트롤을참조하세요 .

속성 문서

count : int

이 속성은 페이지 수를 보유합니다.


currentIndex : int

이 속성은 현재 페이지의 인덱스를 보유합니다.


delegate : Component

이 속성은 페이지를 표시하는 델리게이트를 보유합니다.

각 델리게이트의 컨텍스트에서 사용할 수 있는 프로퍼티는 다음과 같습니다:

index: int항목의 색인
pressed: bool항목이 눌렸는지 여부

interactive : bool

이 속성은 컨트롤이 대화형인지 여부를 보유합니다. 대화형 페이지 표시기는 누름에 반응하여 current index 을 적절하게 자동으로 변경합니다.

SwipeView {
    id: view
    currentIndex: pageIndicator.currentIndex
    anchors.fill: parent

    Page {
        title: qsTr("Home")
    }
    Page {
        title: qsTr("Discover")
    }
    Page {
        title: qsTr("Activity")
    }
}

PageIndicator {
    id: pageIndicator
    interactive: true
    count: view.count
    currentIndex: view.currentIndex

    anchors.bottom: parent.bottom
    anchors.horizontalCenter: parent.horizontalCenter
}

참고: 페이지 표시기는 일반적으로 사용자 인터페이스의 실제 콘텐츠에서 사용자의 주의를 분산시키지 않기 위해 매우 작습니다. 클릭하기 어려울 수 있으며 사용자가 대화형 콘텐츠라고 쉽게 인식하지 못할 수도 있습니다. 이러한 이유로 기본 탐색 방법(예: SwipeView)을 대체하는 것이 아니라 보완하는 용도로 사용하는 것이 가장 좋습니다.

기본값은 false 입니다.


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