Python PyQt5.QtWidgets.QMessageBox.information() Examples
The following are 30
code examples of PyQt5.QtWidgets.QMessageBox.information().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt5.QtWidgets.QMessageBox
, or try the search function
.
Example #1
Source File: mainui_makam.py From dunya-desktop with GNU General Public License v3.0 | 6 votes |
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")
Example #2
Source File: gui.py From payment-proto-interface with MIT License | 6 votes |
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
Example #3
Source File: gui.py From PUBGIS with GNU General Public License v3.0 | 6 votes |
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
Example #4
Source File: gui.py From pbtk with GNU General Public License v3.0 | 6 votes |
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.')
Example #5
Source File: model.py From equant with GNU General Public License v2.0 | 6 votes |
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!")
Example #6
Source File: todopw_z2.py From python101 with MIT License | 6 votes |
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)
Example #7
Source File: gui.py From pbtk with GNU General Public License v3.0 | 5 votes |
def fuzz_endpoint(self): QMessageBox.information(self.view, ' ', 'Automatic fuzzing is not implemented yet.')
Example #8
Source File: SqlQuery.py From PyQt with GNU General Public License v3.0 | 5 votes |
def on_pushButtonQuery_clicked(self): """查询按钮""" self.applyName() self.applySeat() self.applyLicense() self.applyPort() if not self.sql: return QMessageBox.warning(self, '提示', '没有进行任何输入') # 清空数据 self.tableWidget.clear() # 重新设置表头 self.tableWidget.setHorizontalHeaderLabels( ['编号', '姓名', '证件号', '航班号', '航班日期', '座位号', '登机口', '序号', '出发地', '目的地']) # 根据选择的字段进行并列查询 rets = self.session.query(Tourist).filter( and_(*(key == value for key, value in self.sql.items()))).all() if not rets: return QMessageBox.information(self, '提示', '未查询到结果') self.tableWidget.setRowCount(len(rets)) # 根据查询结果添加到表格中 for row, tourist in enumerate(rets): self.tableWidget.setItem(row, 0, QTableWidgetItem(str(tourist.id))) self.tableWidget.setItem( row, 1, QTableWidgetItem(str(tourist.name))) self.tableWidget.setItem( row, 2, QTableWidgetItem(str(tourist.license))) self.tableWidget.setItem( row, 3, QTableWidgetItem(str(tourist.flightnumber))) self.tableWidget.setItem( row, 4, QTableWidgetItem(str(tourist.flightdate))) self.tableWidget.setItem( row, 5, QTableWidgetItem(str(tourist.seatnumber))) self.tableWidget.setItem( row, 6, QTableWidgetItem(str(tourist.boardingport))) self.tableWidget.setItem(row, 7, QTableWidgetItem(str(tourist.no))) self.tableWidget.setItem( row, 8, QTableWidgetItem(str(tourist.departurestation))) self.tableWidget.setItem( row, 9, QTableWidgetItem(str(tourist.destinationstation)))
Example #9
Source File: JsSignals.py From PyQt with GNU General Public License v3.0 | 5 votes |
def callFromJs(self, text): QMessageBox.information(self, "提示", "来自js调用:{}".format(text))
Example #10
Source File: todopw_z1.py From python101 with MIT License | 5 votes |
def loguj(self): 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 QMessageBox.information(self, 'Dane logowania', 'Podano: ' + login + ' ' + haslo, QMessageBox.Ok)
Example #11
Source File: todopw_z0.py From python101 with MIT License | 5 votes |
def loguj(self): login, ok = QInputDialog.getText(self, 'Logowanie', 'Podaj login:') if ok: haslo, ok = QInputDialog.getText(self, 'Logowanie', 'Podaj haslo:') if ok: if not login or not haslo: QMessageBox.warning( self, 'Błąd', 'Pusty login lub hasło!', QMessageBox.Ok) return QMessageBox.information( self, 'Dane logowania', 'Podano: ' + login + ' ' + haslo, QMessageBox.Ok)
Example #12
Source File: qtapp.py From autokey with GNU General Public License v3.0 | 5 votes |
def show_script_error(self): """ Show the last script error (if any) """ # TODO: i18n if self.service.scriptRunner.error: details = self.service.scriptRunner.error self.service.scriptRunner.error = '' else: details = "No error information available" QMessageBox.information(None, "View Script Error Details", details)
Example #13
Source File: MCUProg.py From DMCUProg with MIT License | 5 votes |
def on_btnErase_clicked(self): self.dap = self.openDAP() self.dev = device.Devices[self.cmbMCU.currentText()](self.dap) self.setEnabled(False) self.dev.sect_erase(self.addr, self.size) QMessageBox.information(self, '擦除完成', ' 芯片擦除完成 ', QMessageBox.Yes) self.dap.reset() self.daplink.close() self.setEnabled(True)
Example #14
Source File: main.py From vip_video with GNU General Public License v3.0 | 5 votes |
def on_play_clicked(self): """ Slot documentation goes here. """ # TODO: not implemented yet if self.lineEdit.text(): self.url+=self.lineEdit.text() webbrowser.open(self.url) else: reply=QMessageBox.information(self, "警告","未输入有效url,继续输入点击yes,否则退出程序.",QMessageBox.Yes | QMessageBox.No) if reply == QMessageBox.No: sys.exit(1)
Example #15
Source File: labelTable.py From CNNArt with Apache License 2.0 | 5 votes |
def update_model(self, labelfile): self.labelfile = labelfile filename, file_extension = os.path.splitext(self.labelfile) if not file_extension == '.csv': QMessageBox.information(self, "Warning", "Please select one .csv File with label", QMessageBox.Ok) self.df = pandas.read_csv(self.labelfile) header = ['On/Off', 'label name', 'slice', 'ID'] self.dataListwithInfo = [] dataList = [] num = self.df[self.df['image'] == self.imagefile].index.values.astype(int) for i in range(0, len(num)): newItem = self.df.iloc[num[i]] self.dataListwithInfo.append(newItem) checkbox = QCheckBox("ON") if newItem['status'] == 0: checkbox.setChecked(True) else: checkbox.setChecked(False) dataList.append([checkbox, newItem['labelname'], newItem['slice'], str(num[i])]) self.table_model = MyTableModel(self, dataList, header) self.table_model.viewChanged.connect(self.view_change_file) self.table_model.itemSelected.connect(self.selectRow) self.setModel(self.table_model) self.update()
Example #16
Source File: labelTable.py From CNNArt with Apache License 2.0 | 5 votes |
def set_table_model(self, labelfile, imagefile): self.labelfile = labelfile filename, file_extension = os.path.splitext(self.labelfile) if not file_extension == '.csv': QMessageBox.information(self, "Warning", "Please select one .csv File with label", QMessageBox.Ok) self.imagefile = imagefile self.df = pandas.read_csv(self.labelfile) header = ['On/Off', 'label name', 'slice', 'ID'] self.dataListwithInfo = [] dataList = [] num = self.df[self.df['image'] == self.imagefile].index.values.astype(int) for i in range(0, len(num)): newItem = self.df.iloc[num[i]] self.dataListwithInfo.append(newItem) checkbox = QCheckBox("ON") if newItem['status'] == 0: checkbox.setChecked(True) else: checkbox.setChecked(False) dataList.append([checkbox, newItem['labelname'], newItem['slice'], str(num[i])]) self.table_model = MyTableModel(self, dataList, header) self.table_model.viewChanged.connect(self.view_change_file) self.table_model.itemSelected.connect(self.selectRow) self.setModel(self.table_model) self.update()
Example #17
Source File: input_button_clear.py From Python_Master_Courses with GNU General Public License v3.0 | 5 votes |
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)
Example #18
Source File: JsSignals.py From PyQt with GNU General Public License v3.0 | 5 votes |
def callFromJs(self, text): QMessageBox.information(self, "提示", "来自js调用:{}".format(text))
Example #19
Source File: QLabel_clickable.py From PyQt5 with MIT License | 5 votes |
def Clic(self, accion): QMessageBox.information(self, "Tipo de clic", "Hiciste {}. ".format(accion)) # ================================================================
Example #20
Source File: MCUProg.py From DMCUProg with MIT License | 5 votes |
def on_btnWrite_finished(self): QMessageBox.information(self, '烧写完成', ' 程序烧写完成 ', QMessageBox.Yes) self.dap.reset() self.daplink.close() self.setEnabled(True) self.prgInfo.setVisible(False)
Example #21
Source File: main_win.py From BlindWatermark with GNU General Public License v3.0 | 5 votes |
def checkItem(self,index): file_path = (index.data().split('→'))[-1] if index.data()[:4]=='使用密钥': clipboard = QApplication.clipboard() clipboard.setText(file_path) #此处为密钥 else: self.open_pic = open_pic_thread(file_path) self.open_pic.finished.connect(self.open_pic.deleteLater) self.open_pic.start() # QMessageBox.information(self,"ListView",'row:%s, text:%s' % (index.row(), index.data()))
Example #22
Source File: main_win.py From BlindWatermark with GNU General Public License v3.0 | 5 votes |
def show_recovery(self,num,file_path): if num == 0: QMessageBox.warning(self,"警告",'检测到的特征点过少,请适当调低阈值',QMessageBox.Ok) else: self.open_pic = open_pic_thread(file_path) self.open_pic.finished.connect(self.open_pic.deleteLater) self.open_pic.start() QMessageBox.information(self,"提示",'检测到{}个特征点,恢复图片已写入'.format(num),QMessageBox.Ok)
Example #23
Source File: main_win.py From BlindWatermark with GNU General Public License v3.0 | 5 votes |
def on_pushButton_4_clicked(self): """ 将图片复制到工作目录 """ work_path = self.my_bwm_parameter.get('work_path',None) if not work_path: QMessageBox.warning(self,"警告",'未设定工作目录',QMessageBox.Ok) else: string = 'Done!\n' ori_img_path = self.my_bwm_parameter.get('ori_img',False) if bool(ori_img_path) and os.path.isfile(ori_img_path): img_type = os.path.splitext(ori_img_path)[-1] try: shutil.copyfile(ori_img_path,work_path+'ori'+img_type) string+=(ori_img_path+' → '+work_path+'ori'+img_type+'\n') except shutil.SameFileError: string+='原图片已存在于工作目录\n' wm_path = self.my_bwm_parameter.get('wm',False) if bool(wm_path) and os.path.isfile(wm_path): img_type = os.path.splitext(wm_path)[-1] try: shutil.copyfile(wm_path,work_path+'wm'+img_type) string+=(wm_path+' → '+work_path+'wm'+img_type+'\n') except shutil.SameFileError: string+='水印图片已存在于工作目录\n' QMessageBox.information(self,'信息',string,QMessageBox.Ok)
Example #24
Source File: ModulatorDialog.py From urh with GNU General Public License v3.0 | 5 votes |
def on_btn_autodetect_clicked(self): signal = self.ui.gVOriginalSignal.scene_manager.signal freq = self.current_modulator.estimate_carrier_frequency(signal, self.protocol) if freq is None or freq == 0: QMessageBox.information(self, self.tr("No results"), self.tr("Unable to detect parameters from current signal")) return self.ui.doubleSpinBoxCarrierFreq.setValue(freq) self.detect_fsk_frequencies()
Example #25
Source File: DirectoryTreeView.py From urh with GNU General Public License v3.0 | 5 votes |
def create_directory(self): index = self.model().mapToSource(self.rootIndex()) # type: QModelIndex if not index.isValid(): return model = self.model().sourceModel() dir_name, ok = QInputDialog.getText(self, self.tr("Create Directory"), self.tr("Directory name")) if ok and len(dir_name) > 0: if not model.mkdir(index, dir_name).isValid(): QMessageBox.information(self, self.tr("Create Directory"), self.tr("Failed to create the directory"))
Example #26
Source File: DirectoryTreeView.py From urh with GNU General Public License v3.0 | 5 votes |
def remove(self): index = self.model().mapToSource(self.currentIndex()) # type: QModelIndex if not index.isValid(): return model = self.model().sourceModel() if model.fileInfo(index).isDir(): ok = model.rmdir(index) else: ok = model.remove(index) if not ok: QMessageBox.information(self, self.tr("Remove"), self.tr("Failed to remove {0}".format(model.fileName(index))))
Example #27
Source File: Errors.py From urh with GNU General Public License v3.0 | 5 votes |
def rtlsdr_sdr_driver(): if sys.platform == "win32": w = QWidget() QMessageBox.critical(w, w.tr("Could not access RTL-SDR device"), w.tr("You may need to reinstall the driver with Zadig for 'Composite' device.<br>" "See <a href='https://github.com/jopohl/urh/issues/389'>here</a> " "for more information."))
Example #28
Source File: Errors.py From urh with GNU General Public License v3.0 | 5 votes |
def network_sdr_send_is_elsewhere(): w = QWidget() QMessageBox.information(w, "This feature is elsewhere", "You can send your data with the network SDR by " "using the button below the generator table.")
Example #29
Source File: GPIO.py From tdm with GNU General Public License v3.0 | 5 votes |
def accept(self): payload = ["{} {}".format(k, gb.currentData()) for k, gb in self.gb.items()] self.sendCommand.emit(self.device.cmnd_topic("backlog"), "; ".join(payload)) QMessageBox.information(self, "GPIO saved", "Device will restart.") self.done(QDialog.Accepted)
Example #30
Source File: __init__.py From qgis-minimal-plugin with GNU General Public License v2.0 | 5 votes |
def run(self): QMessageBox.information(None, 'Minimal plugin', 'Do something useful here')