mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile-widgets/qml: Fix Kirigami error.
Solve kirigami error: INFO: qrc:/org/kde/kirigami/ScrollablePage.qml:187: TypeError: Cannot assign to read-only property "parent". Kirigami.scrollPage does not allow a ListModel be defined, even though it is allowed in QtQuick. Signed-off-by: jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
eec1511218
commit
a534f1a25c
1 changed files with 17 additions and 17 deletions
|
@ -11,6 +11,17 @@ Kirigami.ScrollablePage {
|
|||
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
||||
title: qsTr("Dive summary")
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
columns: 3
|
||||
width: parent.width
|
||||
columnSpacing: Kirigami.Units.smallSpacing
|
||||
rowSpacing: Kirigami.Units.smallSpacing
|
||||
|
||||
ListModel {
|
||||
id: monthModel
|
||||
ListElement {text: qsTr("Total")}
|
||||
|
@ -28,17 +39,6 @@ Kirigami.ScrollablePage {
|
|||
ListElement {text: qsTr("12 month [360 days]")}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
columns: 3
|
||||
width: parent.width
|
||||
columnSpacing: Kirigami.Units.smallSpacing
|
||||
rowSpacing: Kirigami.Units.smallSpacing
|
||||
|
||||
TemplateLabel {
|
||||
text: qsTr("oldest/newest dive")
|
||||
font.bold: true
|
||||
|
|
Loading…
Add table
Reference in a new issue