Skip to content
Snippets Groups Projects
Commit dc23ab4f authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu
Browse files

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

parent d1a0dc70
No related branches found
No related tags found
No related merge requests found
Pipeline #580323 passed with warnings with stage
in 23 minutes and 40 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