登陆界面动画效果设置
登陆界面动画效果设置
from PyQt5.Qt import * import sys from pyqt5.Demo.resource.main_login import Login from pyqt5.Demo.resource.main_register import Register if __name__ == '__main__': app = QApplication(sys.argv) window = Register() # def check_login(username, psd): # if username == '85106210' and psd == '1234': # print('成功登陆') # else: # cutton = QPropertyAnimation(window) # cutton.setTargetObject(window.widget_3) # cutton.setPropertyName(b'pos') # cutton.setKeyValueAt(0, window.widget_3.pos()) # cutton.setKeyValueAt(0.2, window.widget_3.pos() + QPoint(15, 0)) # cutton.setKeyValueAt(0.5, window.widget_3.pos()) # cutton.setKeyValueAt(0.7, window.widget_3.pos() + QPoint(-15, 0)) # cutton.setKeyValueAt(1, window.widget_3.pos()) # cutton.setDuration(100) # 动画时长 # cutton.setLoopCount(3) # 抖动三次 # cutton.start(QAbstractAnimation.DeleteWhenStopped) window.register_signal.connect(lambda a, b: print(a, b)) # window.sent_load.connect(check_login) window.show() sys.exit(app.exec_())