1
0
Fork 0
mirror of synced 2024-05-18 19:42:54 +12:00
Rare/rare/components/tabs/store/widgets/groups.py
2024-02-25 21:35:43 +02:00

19 lines
544 B
Python

from PyQt5.QtWidgets import QGroupBox, QLayout
from rare.widgets.loading_widget import LoadingWidget
class StoreGroup(QGroupBox):
def __init__(self, title: str, layout: type[QLayout], parent=None):
super().__init__(parent=parent)
self.setTitle(title)
self.main_layout = layout(self)
self.loading_widget = LoadingWidget(autostart=True, parent=self)
def loading(self, state: bool) -> None:
if state:
self.loading_widget.start()
else:
self.loading_widget.stop()