-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
35 lines (22 loc) · 838 Bytes
/
main.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
from PySide6.QtWidgets import QApplication, QMainWindow
from PySide6.QtCore import Qt
from PySide6.QtGui import QScreen
from login import Ui_Login
class LoginUI(QMainWindow, Ui_Login):
def __init__(self):
super(LoginUI, self).__init__()
self.setupUi(self)
self.setWindowFlags(Qt.FramelessWindowHint)
self.setAttribute(Qt.WA_TranslucentBackground)
# center = QScreen.availableGeometry(QApplication.primaryScreen()).center()
# self.move(center.x() - self.width() / 2, center.y() - self.height() / 2)
self.close_button.clicked.connect(self.close)
self.minimize_button.clicked.connect(self.minimize)
def close(self):
return super().close()
def minimize(self):
self.showMinimized()
app = QApplication([])
w = LoginUI()
w.show()
app.exec()