-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyWinInfo.py
39 lines (25 loc) · 952 Bytes
/
MyWinInfo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from PyQt6.QtWidgets import QMainWindow, QApplication
import qdarktheme
from Widget import MWIWidget
class MyWinInfo(QMainWindow):
_VERSION = "1.1.0"
def __init__(self):
"""
The __init__ function is called when the class is instantiated.
It sets up the window and its central widget, which in this case
is a MWIWidget object.
:param self: Refer to the current instance of a class
:return: The object itself, which is assigned to the variable MyWinInfo
"""
super().__init__()
self.widget = None
self.setWindowTitle("MyWinInfo v" + self._VERSION)
self.setFixedSize(400, 400)
qdarktheme.setup_theme('dark')
self.widget = MWIWidget(self)
self.setCentralWidget(self.widget)
if __name__ == "__main__":
app = QApplication([])
window = MyWinInfo()
window.show()
app.exec()