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


Python QMessageBox.information方法代码示例

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


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

示例1: open_player

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def open_player(self, index):
        if not self.q_threads:
            model_index = self.frame_query.tableView_results.model().mapToSource(index)
            recid = self.recordings[model_index.row()]

            try:
                player = PlayerMainWindow(docid=recid, parent=self)
                player.show()

            except FileNotFoundError:
                QMessageBox.information(self, "QMessageBox.information()",
                                        "Download the selected item.")
        else:
            QMessageBox.information(self, "QMessageBox.information()",
                                    "Player can not be opened until querying "
                                    "finishes") 
开发者ID:MTG,项目名称:dunya-desktop,代码行数:18,代码来源:mainui_makam.py

示例2: make_further_instructions

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def make_further_instructions(self, pr):
        def further_instructions():
            response = QMessageBox.information(self, "Next Step", "To continue, send the necessary amounts of Bitcoin to the addresses specified in the 'Outputs' field above. Once broadcast, press Yes to Continue or Cancel to quit.", QMessageBox.Cancel | QMessageBox.Yes, QMessageBox.Cancel)
            if response == QMessageBox.Cancel:
                sys.exit()
            elif response == QMessageBox.Yes:
                if pr.details.payment_url:
                    raw_tx, okPressed1 = QInputDialog.getText(self, "Enter Raw Transaction","Enter the hex of the transaction that was just made:", QLineEdit.Normal, "")
                    if okPressed1 and raw_tx != '':
                        ref_addr, okPressed2 = QInputDialog.getText(self, "Enter Refund Address","Enter a refund address:", QLineEdit.Normal, "")
                        if okPressed2 and ref_addr != '':
                            try:
                                result = pr.send_ack(raw_tx.strip(), ref_addr.strip())
                                if result[0]:
                                    QMessageBox.information(self, "Complete!", "Payment request successful: " + result[1] + "\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                    sys.exit()
                                else:
                                    QMessageBox.error(self, "Error!", "Payment request was not successful: " + result[1] + "\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                    sys.exit()
                            except:
                                QMessageBox.error(self, "Error!", "There was an error parsing the raw transaction or address. Please restart and try again.\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                sys.exit()
                                
        return further_instructions 
开发者ID:achow101,项目名称:payment-proto-interface,代码行数:26,代码来源:gui.py

示例3: extraction_done

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def extraction_done(self, outputs):
        nb_written_all, wrote_endpoints = 0, False
        
        for folder, output in outputs.items():
            nb_written, wrote_endpoints = extractor_save(BASE_PATH, folder, output)
            nb_written_all += nb_written
        
        if wrote_endpoints:
            self.set_view(self.welcome)
            QMessageBox.information(self.view, ' ', '%d endpoints and their <i>.proto</i> structures have been extracted! You can now reuse the <i>.proto</i>s or fuzz the endpoints.' % nb_written_all)
        
        elif nb_written_all:
            self.set_view(self.welcome)
            QMessageBox.information(self.view, ' ', '%d <i>.proto</i> structures have been extracted! You can now reuse the <i>.protos</i> or define endpoints for them to fuzz.' % nb_written_all)
        
        else:
            self.set_view(self.choose_extractor)
            QMessageBox.warning(self.view, ' ', 'This extractor did not find Protobuf structures in the corresponding format for specified files.') 
开发者ID:marin-m,项目名称:pbtk,代码行数:20,代码来源:gui.py

示例4: loguj

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def loguj(self):
        """ Logowanie użytkownika """
        login, haslo, ok = LoginDialog.getLoginHaslo(self)
        if not ok:
            return

        if not login or not haslo:
            QMessageBox.warning(self, 'Błąd',
                                'Pusty login lub hasło!', QMessageBox.Ok)
            return

        self.osoba = baza.loguj(login, haslo)
        if self.osoba is None:
            QMessageBox.critical(self, 'Błąd', 'Błędne hasło!', QMessageBox.Ok)
            return

        QMessageBox.information(self,
            'Dane logowania', 'Podano: ' + login + ' ' + haslo, QMessageBox.Ok) 
开发者ID:koduj-z-klasa,项目名称:python101,代码行数:20,代码来源:todopw_z2.py

示例5: _validate_inputs

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def _validate_inputs(self, mode):
        if mode == ProcessMode.VIDEO:
            # video file exists
            # output folder exists, writable
            if not os.path.exists(self.video_file_edit.text()):
                QMessageBox.information(self, "Error", "video file not found")
                return False

            if not os.path.exists(os.path.dirname(self.output_file_edit.text())):
                QMessageBox.information(self, "Error", "output directory doesn't exist")
                return False

        if mode == ProcessMode.LIVE:
            if not os.path.exists(self.output_directory_edit.text()):
                QMessageBox.information(self, "Error", "output directory doesn't exist")
                return False

        return True 
开发者ID:andrewzwicky,项目名称:PUBGIS,代码行数:20,代码来源:gui.py

示例6: _onEgReportAnswer

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def _onEgReportAnswer(self, event):
        """获取引擎报告应答数据并显示报告"""
        data = event.getData()
        id = event.getStrategyId()

        tempResult = data["Result"]
        if not tempResult["Fund"]:
            self._logger.info(f"[UI][{id}]: Report data is empty!")
            # QMessageBox.information(None, '提示', '回测数据为空!', QMessageBox.Yes)
            return

        self._reportData = tempResult

        # 取到报告数据弹出报告
        if self._reportData:
            self._logger.info(f"[UI][{id}]: Receiving report data answer successfully!")
            self._app.reportDisplay(self._reportData, id)
            return

        self._logger.info(f"[UI][{id}]: Report data received is empty!") 
开发者ID:epolestar,项目名称:equant,代码行数:22,代码来源:model.py

示例7: printText

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def printText(self):
        text = self.editLine.text()

        if text == '':
            QMessageBox.information(self, "Empty Text",
                                    "Please enter the letter.")
        else:
            QMessageBox.information(self, "Print Success",
                                    "Text: %s" % text) 
开发者ID:makelove,项目名称:Python_Master_Courses,代码行数:11,代码来源:input_button_clear.py

示例8: closeEvent

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def closeEvent(self, event):
        if self.trayIcon.isVisible() and not self.user_closed:
            QMessageBox.information(
                self, "Bitmask",
                "Bitmask will minimize to the system tray. "
                "You can choose 'Quit' from the menu with a "
                "right click on the icon, and restore the window "
                "with a double click.")
        self.hide()
        if not self.user_closed:
            event.ignore() 
开发者ID:leapcode,项目名称:bitmask-dev,代码行数:13,代码来源:systray.py

示例9: _show_wiring

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def _show_wiring(self):
        wiring = "RST\t-> RTS\n" \
                 "GPIO0\t-> DTR\n" \
                 "TXD\t-> RXD\n" \
                 "RXD\t-> TXD\n" \
                 "VCC\t-> 3V3\n" \
                 "GND\t-> GND"
        QMessageBox.information(self, "Wiring", wiring) 
开发者ID:BetaRavener,项目名称:uPyLoader,代码行数:10,代码来源:flash_dialog.py

示例10: on_btnErase_clicked

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def on_btnErase_clicked(self):
        self.jlk = jlink.JLink(self.linDLL.text(), device.Devices[self.cmbMCU.currentText()].CHIP_CORE)
        self.dev = device.Devices[self.cmbMCU.currentText()](self.jlk)
        self.dev.sect_erase(self.addr, self.size)
        QMessageBox.information(self, u'擦除完成', u'        芯片擦除完成        ', QMessageBox.Yes) 
开发者ID:XIVN1987,项目名称:JMCUProg,代码行数:7,代码来源:MCUProg.py

示例11: on_btnWrite_finished

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def on_btnWrite_finished(self):
        QMessageBox.information(self, u'烧写完成', u'        程序烧写完成        ', QMessageBox.Yes)

        self.jlk.reset()

        self.setEnabled(True)
        self.prgInfo.setVisible(False) 
开发者ID:XIVN1987,项目名称:JMCUProg,代码行数:9,代码来源:MCUProg.py

示例12: __init__

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def __init__(self, *args, **kwargs):
        print("[IDASkins] {} by athre0z (zyantific.com) loaded!".format(
            VERSION
        ))

        QObject.__init__(self, *args, **kwargs)
        idaapi.plugin_t.__init__(self)

        # First start dialog.
        self._settings = Settings()
        if self._settings.first_start:
            selection = QMessageBox.information(
                qApp.activeWindow(),
                "IDASkins: First start",
                "IDASkins has detected that this is the first time you've started IDA with "
                "the plugin installed. Select a theme now?",
                QMessageBox.Yes | QMessageBox.No,
            )

            if selection == QMessageBox.Yes:
                self.open_theme_selector()

            self._settings.first_start = False
        else:
            # v2.0.0 used absolute pathes due to a bug.
            # Fix settings from this particular version here.
            theme_dir = self._settings.selected_theme_dir
            if theme_dir and os.path.isabs(theme_dir):
                print('[IDASkins] Updating buggy v2.0.0 theme path')
                self._settings.selected_theme_dir = os.path.split(theme_dir)[-1]

        self._theme_selector = None
        self.apply_stylesheet_from_settings()

        # Subscribe UI notifications.
        self._ui_hooks = UiHooks()
        self._ui_hooks.hook() 
开发者ID:zyantific,项目名称:IDASkins,代码行数:39,代码来源:plugin.py

示例13: show_ip

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def show_ip(self):
        ip = translate('Synchronizer', 'Your IP is:') + ' ' + str(get_lan_ip())
        QMessageBox.information(MainWindow(), ' ', ip) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:5,代码来源:synchronizer.py

示例14: no_reddit_object_selected

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def no_reddit_object_selected(self, type):
        text = 'No %s selected' % type
        reply = message.information(self, 'No Selection', text, message.Ok)
        return reply == message.Ok 
开发者ID:MalloyDelacroix,项目名称:DownloaderForReddit,代码行数:6,代码来源:Messages.py

示例15: failed_to_save

# 需要导入模块: from PyQt5.QtWidgets import QMessageBox [as 别名]
# 或者: from PyQt5.QtWidgets.QMessageBox import information [as 别名]
def failed_to_save(self):
        text = 'Sorry, the user and subreddit lists save attempt was not successful.  Please try again.'
        reply = message.information(self, 'Save Failed', text, message.Ok)
        return reply == message.Ok 
开发者ID:MalloyDelacroix,项目名称:DownloaderForReddit,代码行数:6,代码来源:Messages.py


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