Skip to content
Snippets Groups Projects
Commit 1d10b736 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qml: set the cursor busy in `MainViewLoader` when the model is busy

parent ce8cefe7
No related branches found
No related tags found
1 merge request!7090qml: set the cursor busy in `MainViewLoader` when the model is busy
Pipeline #581924 passed with stage
in 12 minutes and 36 seconds
......@@ -58,6 +58,18 @@ Widgets.StackViewExt {
// NOTE: Sometimes the model has no 'loading' property.
readonly property bool isLoading: model.loading ?? false
onIsLoadingChanged: {
// Adjust the cursor. Unless the loaded item (view) sets a cursor
// globally or for itself, this is going to be respected. It should
// be noted that cursor adjustment is conventionally not delayed,
// unlike indicators:
if (isLoading) {
MainCtx.setCursor(root, Qt.BusyCursor)
} else {
MainCtx.unsetCursor(root)
}
}
readonly property int count: model.count
readonly property bool hasGridListMode: !!grid && !!list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment