このページでは

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
    }
}

SwipeViewPageIndicatorのカスタマイズインジケータ・コントロールも参照してください

プロパティの説明

count : int

このプロパティはページ数を保持する。

currentIndex : int

このプロパティは、現在のページのインデックスを保持する。

delegate : Component

このプロパティは、ページを提示するデリゲートを保持します。

各デリゲートのコンテキストでは、以下のプロパティが利用可能です:

index: intアイテムのインデックス。
pressed: boolアイテムが押されたかどうか。

PageIndicator はデリゲートの所有権を持ちません。

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 です。

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