Page QML Type | Qt Quick Controls 5.15.18 (original) (raw)
Styled page control with support for a header and footer. More...
Import Statement: | import QtQuick.Controls 2.15 |
---|---|
Since: | Qt 5.7 |
Inherits: | Pane |
Properties
- ****footer** : Item
- ****header** : Item
- ****implicitFooterHeight** : real
- ****implicitFooterWidth** : real
- ****implicitHeaderHeight** : real
- ****implicitHeaderWidth** : real
- ****title** : string
Detailed Description
Page is a container control which makes it convenient to add a header and footer item to a page.
The following example snippet illustrates how to use a page-specific toolbar header and an application-wide tabbar footer.
import QtQuick.Controls 2.12
ApplicationWindow { visible: true
[StackView](qml-qtquick-controls2-stackview.html) {
anchors.fill: parent
initialItem: Page {
header: ToolBar {
// ...
}
}
}
footer: TabBar {
// ...
}
}
See also ApplicationWindow, Container Controls, and Focus Management in Qt Quick Controls.
Property Documentation
This property holds the page footer item. The footer item is positioned to the bottom, and resized to the width of the page. The default value is null
.
See also header and ApplicationWindow::footer.
This property holds the page header item. The header item is positioned to the top, and resized to the width of the page. The default value is null
.
See also footer and ApplicationWindow::header.
[read-only] implicitFooterHeight : real
This property holds the implicit footer height.
The value is equal to footer && footer.visible ? footer.implicitHeight : 0
.
This property was introduced in QtQuick.Controls 2.5 (Qt 5.12).
See also implicitFooterWidth and implicitHeaderHeight.
[read-only] implicitFooterWidth : real
This property holds the implicit footer width.
The value is equal to footer && footer.visible ? footer.implicitWidth : 0
.
This property was introduced in QtQuick.Controls 2.5 (Qt 5.12).
See also implicitFooterHeight and implicitHeaderWidth.
[read-only] implicitHeaderHeight : real
This property holds the implicit header height.
The value is equal to header && header.visible ? header.implicitHeight : 0
.
This property was introduced in QtQuick.Controls 2.5 (Qt 5.12).
See also implicitHeaderWidth and implicitFooterHeight.
[read-only] implicitHeaderWidth : real
This property holds the implicit header width.
The value is equal to header && header.visible ? header.implicitWidth : 0
.
This property was introduced in QtQuick.Controls 2.5 (Qt 5.12).
See also implicitHeaderHeight and implicitFooterWidth.
This property holds the page title.
The title is often displayed at the top of a page to give the user context about the page they are viewing.
Page does not render the title itself, but instead relies on the application to do so. For example:
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")
}
}
}
© 2024 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.