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 }
|
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
||||||
title: qsTr("Dive summary")
|
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 {
|
ListModel {
|
||||||
id: monthModel
|
id: monthModel
|
||||||
ListElement {text: qsTr("Total")}
|
ListElement {text: qsTr("Total")}
|
||||||
|
@ -28,17 +39,6 @@ Kirigami.ScrollablePage {
|
||||||
ListElement {text: qsTr("12 month [360 days]")}
|
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 {
|
TemplateLabel {
|
||||||
text: qsTr("oldest/newest dive")
|
text: qsTr("oldest/newest dive")
|
||||||
font.bold: true
|
font.bold: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue