From 0943d0682098c6455bd680d157d534a3406be5f5 Mon Sep 17 00:00:00 2001 From: lennard <44114474+Dummerle@users.noreply.github.com> Date: Sun, 2 Apr 2023 17:50:01 +0200 Subject: [PATCH] Add class loadingWidget --- rare/widgets/loading_widget.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 rare/widgets/loading_widget.py diff --git a/rare/widgets/loading_widget.py b/rare/widgets/loading_widget.py new file mode 100644 index 00000000..617344fb --- /dev/null +++ b/rare/widgets/loading_widget.py @@ -0,0 +1,21 @@ +import qtawesome +from PyQt5.QtCore import QSize +from PyQt5.QtWidgets import QApplication + +from rare.utils.misc import icon + + +class LoadingWidget(qtawesome.IconWidget): + def __init__(self): + super().__init__() + self.setIconSize(QSize(128, 128)) + spin_icon = icon('mdi.loading', + animation=qtawesome.Spin(self, interval=5)) + self.setIcon(spin_icon) + + +if __name__ == '__main__': + app = QApplication([]) + w = LoadingWidget() + w.show() + app.exec_()