org::kde::kirigami::ScrollablePage

Search for usage in LXR

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

Properties

Flickable flickable
 
int horizontalScrollBarPolicy
 
bool keyboardNavigationEnabled
 
QtObject mainItem
 
bool refreshing
 
alias scrollablePageChildren
 
alias scrollablePageData
 
bool supportsRefreshing
 
int verticalScrollBarPolicy
 
- Properties inherited from org::kde::kirigami::Page
ActionIconGroup
 
alias actions
 
alias contextualActions
 
Flickable flickable
 
Item globalToolBarItem
 
int globalToolBarStyle
 
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 a ListView.

Scrolling and scrolling indicators will be automatically managed.

Example usage:

ScrollablePage {
id: root
// The page will automatically be scrollable
Rectangle {
width: root.width
height: 99999
}
}
Warning
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

Example usage:

Kirigami.ScrollablePage {
id: view
onRefreshingChanged: {
if (refreshing) {
myModel.refresh();
}
}
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 64 of file ScrollablePage.qml.

Property Documentation

◆ flickable

Flickable org::kde::kirigami::ScrollablePage::flickable
read

This property holds the main Flickable item of this page.

Deprecated:
here for compatibility; will be removed in KF6.

Definition at line 89 of file ScrollablePage.qml.

◆ horizontalScrollBarPolicy

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

This property sets the horizontal scrollbar policy.

Definition at line 103 of file ScrollablePage.qml.

◆ keyboardNavigationEnabled

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

This property sets whether it is possible to navigate the items in a view that support it.

If true, and if flickable is an item view (e.g. ListView, GridView), it will be possible to navigate the view current items with keyboard up/down arrow buttons. Also, any key event will be forwarded to the current list item.

default: true

Definition at line 125 of file ScrollablePage.qml.

◆ refreshing

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

This property tells whether the list is asking for a refresh.

This property will automatically be set to true when the user pulls the list down enough, which in return, shows a loading spinner. When this is set to true, it signals the application logic to start its refresh procedure.

default: false

Note
The application itself will have to set back this property to false when done.

Definition at line 78 of file ScrollablePage.qml.

◆ scrollablePageData

alias org::kde::kirigami::ScrollablePage::scrollablePageData
read
Remarks
This is the default property

Definition at line 106 of file ScrollablePage.qml.

◆ supportsRefreshing

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

This property sets whether scrollable page supports "pull down to refresh" behaviour.

default: false

Definition at line 84 of file ScrollablePage.qml.

◆ verticalScrollBarPolicy

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

This property sets the vertical scrollbar policy.

Definition at line 98 of file ScrollablePage.qml.


The documentation for this class was generated from the following file:
bool supportsRefreshing
This property sets whether scrollable page supports "pull down to refresh" behaviour.
bool refreshing
This property tells whether the list is asking for a refresh.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jan 27 2023 07:55:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.