org::kde::kirigami::ScrollablePage

Search for usage in LXR

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

Properties

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

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 60 of file ScrollablePage.qml.

Property Documentation

◆ flickable

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

The main Flickable item of this page.

Definition at line 80 of file ScrollablePage.qml.

◆ horizontalScrollBarPolicy

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

The horizontal scrollbar policy.

Definition at line 90 of file ScrollablePage.qml.

◆ keyboardNavigationEnabled

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

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 106 of file ScrollablePage.qml.

◆ mainItem

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

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

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

Definition at line 98 of file ScrollablePage.qml.

◆ refreshing

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

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 69 of file ScrollablePage.qml.

◆ supportsRefreshing

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

If true the list supports the "pull down to refresh" behavior. By default it is false.

Definition at line 75 of file ScrollablePage.qml.

◆ verticalScrollBarPolicy

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

The vertical scrollbar policy.

Definition at line 85 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 Jul 1 2022 05:18:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.