MCPcopy Index your code
hub / github.com/PyQt5/PyQt / LoginWidget

Class LoginWidget

QPropertyAnimation/FlipWidgetAnimation.py:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class LoginWidget(QLabel):
26 # 只是显示登录界面截图
27
28 windowClosed = pyqtSignal()
29 windowChanged = pyqtSignal()
30
31 def __init__(self, *args, **kwargs):
32 super(LoginWidget, self).__init__(*args, **kwargs)
33 self.setPixmap(QPixmap('Data/1.png'))
34
35 def mousePressEvent(self, event):
36 super(LoginWidget, self).mousePressEvent(event)
37 pos = event.pos()
38 if pos.y() <= 40:
39 if pos.x() > self.width() - 30:
40 # 点击关闭按钮的地方
41 self.windowClosed.emit()
42 elif self.width() - 90 <= pos.x() <= self.width() - 60:
43 # 点击切换按钮
44 self.windowChanged.emit()
45
46
47class SettingWidget(QLabel):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected