本文整理汇总了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!")
示例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!")
示例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, "格式转换", "转换失败!")
示例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))
示例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)
示例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')
示例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)