本文整理汇总了Python中qtpy.QtWidgets.QDialog.reject方法的典型用法代码示例。如果您正苦于以下问题:Python QDialog.reject方法的具体用法?Python QDialog.reject怎么用?Python QDialog.reject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qtpy.QtWidgets.QDialog
的用法示例。
在下文中一共展示了QDialog.reject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: reject
# 需要导入模块: from qtpy.QtWidgets import QDialog [as 别名]
# 或者: from qtpy.QtWidgets.QDialog import reject [as 别名]
def reject(self):
""" """
if self.busy:
answer = QMessageBox.question(
self,
'Quit Conda Manager?',
'Conda is still busy.\n\nDo you want to quit?',
buttons=QMessageBox.Yes | QMessageBox.No)
if answer == QMessageBox.Yes:
QDialog.reject(self)
# Do some cleanup?
else:
QDialog.reject(self)
示例2: cancel_process
# 需要导入模块: from qtpy.QtWidgets import QDialog [as 别名]
# 或者: from qtpy.QtWidgets.QDialog import reject [as 别名]
def cancel_process(self):
"""
Allow user to cancel an ongoing process.
"""
logger.debug(str('process canceled by user.'))
if self.busy:
dlg = self.cancel_dialog()
reply = dlg.exec_()
if reply:
self.update_status(hide=False, message='Process cancelled')
self.api.conda_terminate()
self.api.download_requests_terminate()
self.api.conda_clear_lock()
self.table.clear_actions()
self.sig_process_cancelled.emit()
else:
QDialog.reject(self)
示例3: reject
# 需要导入模块: from qtpy.QtWidgets import QDialog [as 别名]
# 或者: from qtpy.QtWidgets.QDialog import reject [as 别名]
def reject(self):
self.data = None
QDialog.reject(self)
示例4: reject
# 需要导入模块: from qtpy.QtWidgets import QDialog [as 别名]
# 或者: from qtpy.QtWidgets.QDialog import reject [as 别名]
def reject(self):
"""Reimplement Qt method"""
if self.arraywidget is not None:
for index in range(self.stack.count()):
self.stack.widget(index).reject_changes()
QDialog.reject(self)