parent
6cfcd92c00
commit
7ffb99e724
|
@ -31,9 +31,17 @@ ApplicationWindow {
|
||||||
anchors.topMargin: 48
|
anchors.topMargin: 48
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: navigation
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
text: "Load asynchronously"
|
||||||
|
checked: storeSettings.loadAsynchronously
|
||||||
|
|
||||||
|
onToggled: storeSettings.loadAsynchronously = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
Item { width: 1; height: 30 }
|
||||||
|
|
||||||
StatusNavigationListItem {
|
StatusNavigationListItem {
|
||||||
title: "CommunitiesPortalLayout"
|
title: "CommunitiesPortalLayout"
|
||||||
selected: viewLoader.source.toString().includes(title)
|
selected: viewLoader.source.toString().includes(title)
|
||||||
|
@ -43,20 +51,37 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
centerPanel: Item {
|
centerPanel: Item {
|
||||||
id: centerPanel
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: viewLoader
|
id: viewLoader
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
source: storeSettings.selected
|
source: storeSettings.selected
|
||||||
|
asynchronous: storeSettings.loadAsynchronously
|
||||||
|
visible: status === Loader.Ready
|
||||||
|
|
||||||
|
// force reload when `asynchronous` changes
|
||||||
|
onAsynchronousChanged: {
|
||||||
|
const tmp = storeSettings.selected
|
||||||
|
storeSettings.selected = ""
|
||||||
|
storeSettings.selected = tmp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BusyIndicator {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
visible: viewLoader.status === Loader.Loading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings {
|
Settings {
|
||||||
id: storeSettings
|
id: storeSettings
|
||||||
|
|
||||||
property string selected: ""
|
property string selected: ""
|
||||||
|
property bool loadAsynchronously: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue