当前位置: 首页>>代码示例>>Python>>正文


Python QDialog.reject方法代码示例

本文整理汇总了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)
开发者ID:Discalced51,项目名称:conda-manager,代码行数:16,代码来源:packages.py

示例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)
开发者ID:Discalced51,项目名称:conda-manager,代码行数:19,代码来源:packages.py

示例3: reject

# 需要导入模块: from qtpy.QtWidgets import QDialog [as 别名]
# 或者: from qtpy.QtWidgets.QDialog import reject [as 别名]
 def reject(self):
     self.data = None
     QDialog.reject(self)
开发者ID:ShenggaoZhu,项目名称:spyder,代码行数:5,代码来源:formlayout.py

示例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)
开发者ID:ChunHungLiu,项目名称:spyder,代码行数:8,代码来源:arrayeditor.py


注:本文中的qtpy.QtWidgets.QDialog.reject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。