このページでは

Page QML Type

ヘッダーとフッターをサポートするスタイル付きページ・コントロール。詳細...

Import Statement: import QtQuick.Controls
Inherits:

Pane

プロパティ

詳細説明

Page は、headerfooter アイテムをページに追加するのに便利なコンテナコントロールです。

ヘッダー、コンテンツエリア、フッターを示すページレイアウト

ページの子として宣言されたアイテムは

  • 自動的にページの contentItem の親になります。動的に作成されたアイテムは、明示的に contentItem の親になる必要があります。
  • 自動的に位置やサイズが変更されません。

次のサンプル・スニペットは、ページ固有のツールバー・ヘッダーとアプリケーション全体のタブバー・フッターを使用する方法を示しています。

import QtQuick.Controls
import QtQuick.Layouts

ApplicationWindow {
    visible: true

    StackView {
        anchors.fill: parent

        initialItem: Page {
            header: ToolBar {
                // ...
            }

            ColumnLayout {
                anchors.fill: parent
                // ...
            }
        }
    }

    footer: TabBar {
        // ...
    }
}

Qt Quick ControlsApplicationWindowコンテナ・コントロールフォーカス管理も参照してください

プロパティ・ドキュメント

このプロパティは、ページのフッター項目を保持する。フッター項目は一番下に配置され、ページの幅に合わせてリサイズされます。デフォルト値はnull です。

注 : ToolBarTabBarDialogButtonBox をページ フ ッ タ と し て割 り 当て る と 、 それぞれのToolBar::positionTabBar::positionDialogButtonBox::position プ ロパテ ィ が自動的にFooter に設定 さ れます。

header およびApplicationWindow::footerも参照

header : Item

このプロパティは、ページのヘッダー項目を保持する。ヘッダー項目は上部に配置され、ページの幅に合わせてリサイズされます。デフォルト値はnull です。

注: ToolBarTabBarDialogButtonBox をページヘッダーとして割り当てると、それぞれのToolBar::positionTabBar::positionDialogButtonBox::position プロパティが自動的にHeader に設定されます。

footer およびApplicationWindow::headerも参照

implicitFooterHeight : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

このプロパティは、暗黙のフッターの高さを保持する。

値はfooter && footer.visible ? footer.implicitHeight : 0 に等しい。

このプロパティは QtQuick.Controls 2.5 (Qt 5.12) で導入されました。

implicitFooterWidth およびimplicitHeaderHeightも参照してください

implicitFooterWidth : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

このプロパティは、暗黙のフッター幅を保持する。

値はfooter && footer.visible ? footer.implicitWidth : 0 に等しい。

このプロパティは QtQuick.Controls 2.5 (Qt 5.12) で導入されました。

implicitFooterHeight およびimplicitHeaderWidthも参照してください

implicitHeaderHeight : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

このプロパティは暗黙のヘッダーの高さを保持する。

値はheader && header.visible ? header.implicitHeight : 0 に等しい。

このプロパティは QtQuick.Controls 2.5 (Qt 5.12) で導入されました。

implicitHeaderWidth およびimplicitFooterHeightも参照してください

implicitHeaderWidth : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

このプロパティは暗黙のヘッダー幅を保持する。

値はheader && header.visible ? header.implicitWidth : 0 に等しい。

このプロパティは QtQuick.Controls 2.5 (Qt 5.12) で導入されました。

implicitHeaderHeight およびimplicitFooterWidthも参照してください

title : string

このプロパティはページタイトルを保持します。

タイトルはしばしばページの上部に表示され、ユーザーに表示中のページに関するコンテキストを与えます。

Pageはタイトル自体をレンダリングせず、アプリケーションに依存します。例えば

ApplicationWindow {
    visible: true
    width: 400
    height: 400

    header: Label {
        text: view.currentItem.title
        horizontalAlignment: Text.AlignHCenter
    }

    SwipeView {
        id: view
        anchors.fill: parent

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

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