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


Python QMessageBox.information方法代码示例

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


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

示例1: saveXML

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
 def saveXML(self):
     if len(self.tools.framemenu.getAllFrames()) > 1:
         result = QFileDialog.getSaveFileName(self, 'Choose the destination for the animation file!', '.', 'Animation File (*.armo)')
         if result[0] != "":
             XML().toXML(self.tools.framemenu.getAllFrames(), result[0])
     else:
         QMessageBox.information(self, "Stickman Message", "You need at least 2 frames to save the animation!")
开发者ID:artemmoskalev,项目名称:stickman_animator,代码行数:9,代码来源:AnimationTools.py

示例2: fromXML

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
 def fromXML(self):
     file = QFileDialog.getOpenFileName(self, "Load Animation", ".", "Animation Files (*.armo)")
     if file[0] != "":
         try:
             frames = XML().fromXML(file[0])
             self.tools.framemenu.removeAllFrames()
             for frame in frames:
                 self.tools.framemenu.addNewFrame(frame)
             if len(frames) > 0:
                 getWorld().setWorldFrom(frames[0])
         except:
             QMessageBox.information(self, "Stickman Message", "The animation file is not valid!")
开发者ID:artemmoskalev,项目名称:stickman_animator,代码行数:14,代码来源:AnimationTools.py

示例3: buttonExportClicked

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
 def buttonExportClicked(self):
     (filePaths, filter) = QFileDialog.getOpenFileNames(
         parent=self,
         caption="转换数据库文件为文本格式",
         directory=QApplication.applicationDirPath() + "/../data",
         filter="Database file (*.db * mdb)",
     )
     if not filePaths:
         return
     #
     if DatabaseMgr().convertToText(filePaths):
         QMessageBox.information(self, "格式转换", "转换成功!")
     else:
         QMessageBox.warning(self, "格式转换", "转换失败!")
开发者ID:iclosure,项目名称:carmonitor,代码行数:16,代码来源:history_widget.py

示例4: show_font_face_rule_for_font_file

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
def show_font_face_rule_for_font_file(file_data, added_name, parent=None):
    try:
        fm = FontMetadata(BytesIO(file_data)).to_dict()
    except UnsupportedFont:
        return
    pp = _('Change this to the relative path to: %s') % added_name
    rule = '''@font-face {{
  src: url({pp});
  font-family: "{ff}";
  font-weight: {w};
  font-style: {sy};
  font-stretch: {st};
  }}'''.format(pp=pp, ff=fm['font-family'], w=fm['font-weight'], sy=fm['font-style'], st=fm['font-stretch'])
    QApplication.clipboard().setText(rule)
    QMessageBox.information(parent, _('Font file added'), _(
        'The font file <b>{}</b> has been added. The text for the CSS @font-face rule for this file has been copied'
        ' to the clipboard. You should paste it into whichever CSS file you want to add this font to.').format(added_name))
开发者ID:JimmXinu,项目名称:calibre,代码行数:19,代码来源:manage_fonts.py

示例5: _monkey_clicked

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
 def _monkey_clicked(self, row, col):
     employee = self.tbl.item(row, 0).text()
     monkey = self.monkeys[col - 2]
     hdr = '%s\n%s' % (employee, Monkey.prettify(monkey))
     lines = []
     total = 0
     for asn in self.efforts[employee].assignments:
         interval = TimeInterval(
             first_month=asn.first_month,
             last_month=asn.last_month
         )
         asn_monkeys = Monkey.monkey_list(interval)
         if monkey in asn_monkeys:
             lines.append('%s: %d' % (asn.project_name, asn.effort))
             total += asn.effort
     msg = hdr + '\n\n' + '\n'.join(lines) + ('\n\nTotal: %d' % total)
     QMessageBox.information(QMessageBox(), 'Effort Breakdown', msg)
开发者ID:joegillon,项目名称:allocat_effort,代码行数:19,代码来源:effort_window.py

示例6: show_dialog

# 需要导入模块: from PyQt5.Qt import QMessageBox [as 别名]
# 或者: from PyQt5.Qt.QMessageBox import information [as 别名]
 def show_dialog(self):
     QMessageBox.information(self, 'A test dialog', 'While this dialog is shown, the global menu should be hidden')
开发者ID:artbycrunk,项目名称:calibre,代码行数:4,代码来源:demo.py

示例7: javaScriptAlert

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


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