Add class loadingWidget
This commit is contained in:
parent
3ec6a45cc3
commit
0943d06820
21
rare/widgets/loading_widget.py
Normal file
21
rare/widgets/loading_widget.py
Normal file
|
@ -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_()
|
Loading…
Reference in a new issue