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


Python QMessageBox.critical方法代码示例

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


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

示例1: btnFetchUrl_clicked

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
 def btnFetchUrl_clicked(self):
     bc = BloggerClient(str(self.editHost.text()), str(self.editLogin.text()), str(self.editPassword.text()))
     try:
         url = bc.getHomepage(self.blogs[unicode(self.comboBlogs.currentText())]['id'])
         if url:
             self.editURL.setText(url)
     except Exception, inst:
         print "btnFetchUrl_clicked: %s" % inst
         QMessageBox.critical(self, "Error", "Couldn't fetch blog's URL!")
开发者ID:BackupTheBerlios,项目名称:pyqlogger-svn,代码行数:11,代码来源:SetupWizardForm_Impl.py

示例2: accept

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
 def accept(self):
     """Aceptacion del dialogo"""
     if self.comboBox1.currentText() == "Espacio":
         delatr = ""
     elif self.comboBox1.currentText() == "Dos puntos":
         delatr = ":"
     else:
         delatr = "\t"
     if self.checkBox1.isChecked():
         cabecera = True
     else:
         cabecera = False
     from rpy import RException
     try:
         self.__idf.borrar_todo()
         self.__idf.cargar_texto(self.archivo, delimitadoratrib = delatr, cabeceras = cabecera)
     except RException:
         msg = u"R No pudo importar el fichero"
         QMessageBox.critical(self, u'Error!', msg)
         LOG.exception("Excepcion en la importacion de texto")
     DialogoImportarTexto.accept(self)
     self.parent().grid.myUpdate()
开发者ID:,项目名称:,代码行数:24,代码来源:

示例3: btnFetchBlogs_clicked

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
 def btnFetchBlogs_clicked(self):
     host = str(self.editHost.text())
     login = str(self.editLogin.text())
     password = str(self.editPassword.text())
     endpoint = str(self.editEP.text())
     feedpath = str(self.editFP.text())
     postpath = str(self.editPassword.text())
     if self.comboProviders.currentItem() == 0:
         at = GenericAtomClient(host, login, password, endpoint, feedpath, postpath)
     elif self.comboProviders.currentItem() == 1:
         at = BloggerClient(host, login, password)
     elif self.comboProviders.currentItem() == 2:
         at = MovableTypeClient(host, login, password)
     try:
         self.blogs = at.getBlogs()
         self.comboBlogs.clear()
         for blog in self.blogs.keys():
             self.comboBlogs.insertItem(blog)
         self.editLogin_textChanged(None)
     except Exception, inst:
         print "btnFetchBlogs_clicked: %s" % inst
         QMessageBox.critical(self, "Error", "Couldn't fetch list of blogs!")
开发者ID:BackupTheBerlios,项目名称:pyqlogger-svn,代码行数:24,代码来源:SetupWizardForm_Impl.py

示例4: showErrorMessage

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
    def showErrorMessage(self, errorMessage):
        """ Displays the given error message. """

        QMessageBox.critical(self.__generatedDialog, _creationErrorMessage, errorMessage)
开发者ID:DLR-SC,项目名称:DataFinder,代码行数:6,代码来源:view.py

示例5: previewWindow_ready

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
    def previewWindow_ready(self):
        # set default font
        if __debug__:
            path = os.path.join(os.path.dirname(__file__), DEFAULT_FONT)
        else:
            appDir = six.text_type(QCoreApplication.applicationDirPath())
            path = os.path.join(appDir, DEFAULT_FONT)
        if not os.path.exists(path):
            QMessageBox.critical(self,
                self.tr("Font not found"),
                self.tr("Font \"%1\" cannot open.").arg(path)
            )
            sys.exit(1)
        font = ftgl.FTPixmapFont(path.encode(DEFAULT_ENCODING))
        if not font.FaceSize(30):
            print("FaceSize error.", file=sys.stderr)
        self.glWindow.context().fontRegistry.installFont(None, font)

        # init double buffer
        self.doubleBufferObject = DoubleBufferObject()
        self.glWindow.setDoubleBufferObject(self.doubleBufferObject)

        # set to ready
        self.previewHasReady = True
开发者ID:sumi-nook,项目名称:hestia-alpha,代码行数:26,代码来源:mainwindow.py

示例6: __showErrorMessage

# 需要导入模块: from qt import QMessageBox [as 别名]
# 或者: from qt.QMessageBox import critical [as 别名]
    def __showErrorMessage(self, errorMessage):
        """ Display the given error message. """

        QMessageBox.critical(self, self.__errorMessageCaption, errorMessage)
        self.__logger.error(errorMessage)
开发者ID:DLR-SC,项目名称:DataFinder,代码行数:7,代码来源:admin_application.py


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