Search for usage in LXR

org::kde::kirigami::ScrollablePage Class Reference
Inheritance diagram for org::kde::kirigami::ScrollablePage:


alias flickable
alias horizontalScrollBarPolicy
bool keyboardNavigationEnabled
QtObject mainItem
alias refreshing
alias supportsRefreshing
alias verticalScrollBarPolicy
- Properties inherited from org::kde::kirigami::Page
alias actions
alias contextualActions
Flickable flickable
Item globalToolBarItem
int globalToolBarStyle
ActionIconGroup icon
bool isCurrentPage
alias leftAction
alias mainAction
bool needsAttention
alias overlay
var progress
alias rightAction
Component titleDelegate

Additional Inherited Members

- Signals inherited from org::kde::kirigami::Page
void backRequested (var event)
void contextualActionsAboutToShow ()

Detailed Description

ScrollablePage is a Page that holds scrollable content, such as ListViews.

Scrolling and scrolling indicators will be automatically managed.

ScrollablePage {
id: root
//The rectangle will automatically be scrollable
Rectangle {
width: root.width
height: 99999
Do not put a ScrollView inside of a ScrollablePage; children of a ScrollablePage are already inside a ScrollView.

Another behavior added by this class is a "scroll down to refresh" behavior It also can give the contents of the flickable to have more top margins in order to make possible to scroll down the list to reach it with the thumb while using the phone with a single hand.

Implementations should handle the refresh themselves as follows

Kirigami.ScrollablePage {
id: view
onRefreshingChanged: {
if (refreshing) {
ListView {
// NOTE: MyModel doesn't come from the components,
// it's purely an example on how it can be used together
// some application logic that can update the list model
// and signals when it's done.
model: MyModel {
onRefreshDone: view.refreshing = false;
delegate: BasicListItem {}

Definition at line 59 of file ScrollablePage.qml.

Property Documentation

QtQuick Flickable org::kde::kirigami::ScrollablePage::flickable

The main Flickable item of this page.

Definition at line 79 of file ScrollablePage.qml.

Qt ScrollBarPolicy org::kde::kirigami::ScrollablePage::horizontalScrollBarPolicy

The horizontal scrollbar policy.

Definition at line 89 of file ScrollablePage.qml.

bool org::kde::kirigami::ScrollablePage::keyboardNavigationEnabled

If true, and if flickable is an item view, like a ListView or a GridView, it will be possible to navigate the list current item to next and previous items with keyboard up/down arrow buttons.

Also, any key event will be forwarded to the current list item. default is true.

Definition at line 105 of file ScrollablePage.qml.

QtObject org::kde::kirigami::ScrollablePage::mainItem

The main content Item of this page.

In the case of a ListView or GridView, both contentItem and flickable will be a pointer to the ListView (or GridView).

This can't be contentItem as Page's contentItem is final.
This is the default property

Definition at line 97 of file ScrollablePage.qml.

bool org::kde::kirigami::ScrollablePage::refreshing

If true the list is asking for refresh and will show a loading spinner.

it will automatically be set to true when the user pulls down enough the list. This signals the application logic to start its refresh procedure. The application itself will have to set back this property to false when done.

Definition at line 68 of file ScrollablePage.qml.

bool org::kde::kirigami::ScrollablePage::supportsRefreshing

If true the list supports the "pull down to refresh" behavior.

By default it is false.

Definition at line 74 of file ScrollablePage.qml.

Qt ScrollBarPolicy org::kde::kirigami::ScrollablePage::verticalScrollBarPolicy

The vertical scrollbar policy.

Definition at line 84 of file ScrollablePage.qml.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Jan 21 2022 22:34:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.