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


Python QMessageBox.question方法代码示例

本文整理汇总了Python中PyQt5.Qt.QMessageBox.question方法的典型用法代码示例。如果您正苦于以下问题:Python QMessageBox.question方法的具体用法?Python QMessageBox.question怎么用?Python QMessageBox.question使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.Qt.QMessageBox的用法示例。


在下文中一共展示了QMessageBox.question方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _remove_clicked

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import question [as 别名]
 def _remove_clicked(self):
     nickname = self.ui.nicknameEdit.text()
     msg = 'Are you sure you want to remove project ' + nickname + '?'
     reply = QMessageBox.question(QMessageBox(), 'Double check', msg)
     if reply == QMessageBox.Yes:
         rec = Dataset.projects[nickname]
         rec.remove()
         del Dataset.projects[nickname]
         self._load_list(Dataset.projects.keys())
开发者ID:joegillon,项目名称:allocat_effort,代码行数:11,代码来源:project_window.py

示例2: deleteFrame

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import question [as 别名]
 def deleteFrame(self, caller):
     if not self.buttons.active == None:
         response = QMessageBox.question(caller, 'Frame Remove Message', "Are you sure you want to delete this frame?", QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes)
         if response == QMessageBox.Yes:
             self.buttons.active.setParent(None)
             del self.buttons[self.buttons.active]
             if self.start_index > 0:
                 self.start_index = self.start_index-1
             self.parent().canvas.hideMessage()
     self.rearrangeButtons()
开发者ID:artemmoskalev,项目名称:stickman_animator,代码行数:12,代码来源:Lists.py

示例3: exportToPDF

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import question [as 别名]
    def exportToPDF(self):
        if self.slotsExportedDisabled_:
            return

        util = FLUtil()
        fileName = QFileDialog.getSaveFileName(
            self,
            util.translate("app", "Exportar a PDF"),
            "",
            util.translate("app", "Fichero PDF (*.pdf)")
        )

        if fileName[0] == '':
            return

        if fileName[0].upper().find(".PDF") == -1:
            fileName = fileName[0] + ".pdf"

        if QtCore.QFile.exists(fileName):

            q = QMessageBox.question(
                self,
                util.translate("app", "Sobreescribir {}").format(fileName),
                util.translate(
                    "app",
                    "Ya existe un fichero llamado {}. ¿Desea sobreescribirlo?"
                ).format(fileName),
                util.translate("app", "&Sí"),
                util.translate("app", "&No"),
                "",
                0,
                1
            )
            if q:
                return

        self.slotPrintReportToPdf(fileName)
开发者ID:juanjosepablos,项目名称:pineboo,代码行数:39,代码来源:flreportviewer.py

示例4: _remove_clicked

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import question [as 别名]
 def _remove_clicked(self):
     # nickname = self.ui.nicknameEdit.text()
     msg = 'Are you sure you want to remove assignment ?'
     reply = QMessageBox.question(QMessageBox(), 'Double check', msg)
开发者ID:joegillon,项目名称:allocat_effort,代码行数:6,代码来源:assignment_dialog.py

示例5: javaScriptConfirm

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import question [as 别名]
	def javaScriptConfirm(self, frame, msg):
		return QMessageBox.question(self.view().parentWidget(), None, msg) == QMessageBox.Yes
开发者ID:Fe-ver,项目名称:hae,代码行数:4,代码来源:webpage.py


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