马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
def closeEvent(self, event):
if self.is_change_user:
reply = QMessageBox.question(self, '消息', '确定退出当前账号吗?',
QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
else:
reply = QMessageBox.question(self, '消息', '确定退出系统吗?',
QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
event.accept()
if self.is_change_user:
self.login_win.show()
else:
event.ignore()
self.is_change_user = False
在pycharm中QMessageBox.question(self)中的self下打了波浪线显示Expected type 'QMessageBox', got 'MainWindow' instead
Inspection info: This inspection detects type errors in function call expressions. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations.程序一触发QMessage就异样卡住了是咋回事 |