1
0
Fork 0
mirror of synced 2024-07-01 12:40:28 +12:00
Rare/rare/components/tabs/settings/settings_widget.py

16 lines
591 B
Python
Raw Normal View History

2021-03-27 06:04:29 +13:00
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QPushButton, QGroupBox
2021-02-20 06:09:00 +13:00
2021-03-27 06:04:29 +13:00
class SettingsWidget(QGroupBox):
2021-02-27 07:28:54 +13:00
def __init__(self, text: str, widget: QWidget, accept_button: QPushButton = None):
2021-02-20 06:09:00 +13:00
super(SettingsWidget, self).__init__()
self.setObjectName("settings_widget")
self.layout = QVBoxLayout()
self.info_text = QLabel("")
2021-03-27 06:04:29 +13:00
self.setTitle(text)
2021-02-20 06:09:00 +13:00
self.layout.addWidget(widget)
if accept_button:
self.layout.addWidget(accept_button)
self.layout.addWidget(self.info_text)
self.setLayout(self.layout)