當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。