from PyQt5.Qt import * from Login_Pane import LoginPane from Query_Pane import QueryPane if __name__ == '__main__': import sys app = QApplication(sys.argv) login_pane = LoginPane() login_pane.show() query_pane = QueryPane() def success_login_slot(content): print(content) login_pane.hide() query_pane.setWindowTitle(content) query_pane.show() login_pane.success_login.connect(success_login_slot) sys.exit(app.exec())
from Login_Pane import LoginPane from Register_Pane import RegisterPane from Caculator_Pane import CaculatorPane from PyQt5.Qt import * # 200 if __name__ == '__main__': import sys app = QApplication(sys.argv) # 控件面板的创建 login_pane = LoginPane() register_pane = RegisterPane(login_pane) register_pane.move(0, login_pane.height()) register_pane.show() caculator_pane = CaculatorPane() # 槽函数 def exit_register_pane(): animation = QPropertyAnimation(register_pane) animation.setTargetObject(register_pane) animation.setPropertyName(b"pos") animation.setStartValue(QPoint(0, 0)) animation.setEndValue(QPoint(login_pane.width(), 0)) animation.setDuration(1000) animation.setEasingCurve(QEasingCurve.InBounce) animation.start(QAbstractAnimation.DeleteWhenStopped) def show_register_pane(): print("展示注册界面") animation = QPropertyAnimation(register_pane)
from PyQt5.Qt import * from Login_Pane import LoginPane from Query_Pane import QueryPane if __name__ == '__main__': import sys app = QApplication(sys.argv) print('登录界面显示') login_pane = LoginPane() login_pane.setWindowTitle("fuck12306") # 设置标题窗口 login_pane.show() # login_pane.hide() query_pane = QueryPane() def success_login_slot(content): login_pane.hide() query_pane.setWindowTitle(content) query_pane.show() login_pane.success_login.connect(success_login_slot) login_pane.show() sys.exit(app.exec_())