-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from qgis/38-move-the-reload-resources-button
Move the reload resources button & Better UX when reload resource
- Loading branch information
Showing
4 changed files
with
99 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from qgis.PyQt.QtCore import QCoreApplication, Qt | ||
from qgis.PyQt.QtWidgets import QApplication | ||
|
||
|
||
def show_busy_cursor(func): | ||
def wrapper(*args, **kwargs): | ||
QApplication.setOverrideCursor(Qt.WaitCursor) | ||
QCoreApplication.processEvents() | ||
|
||
try: | ||
return func(*args, **kwargs) | ||
finally: | ||
QApplication.restoreOverrideCursor() | ||
QCoreApplication.processEvents() | ||
|
||
return wrapper |