def _show_compatibility_message(self, message): """Show a compatibility message.""" messageBox = QMessageBox(self) messageBox.setWindowModality(Qt.NonModal) messageBox.setAttribute(Qt.WA_DeleteOnClose) messageBox.setWindowTitle('Compatibility Check') messageBox.setText(message) messageBox.setStandardButtons(QMessageBox.Ok) messageBox.show()
def show_error_message(self, message): """Show error message.""" messageBox = QMessageBox(self) messageBox.setWindowModality(Qt.NonModal) messageBox.setAttribute(Qt.WA_DeleteOnClose) messageBox.setWindowTitle('Render Report Error') messageBox.setText(message) messageBox.setStandardButtons(QMessageBox.Ok) messageBox.show()
def show_compatibility_message(self, message): """Show compatibility message.""" messageBox = QMessageBox(self) messageBox.setWindowModality(Qt.NonModal) messageBox.setAttribute(Qt.WA_DeleteOnClose) messageBox.setWindowTitle('Compatibility Check') messageBox.setText(message) messageBox.setStandardButtons(QMessageBox.Ok) messageBox.show()
def show_dialog(parent, title, text, icon): m = QMessageBox(parent) m.setWindowModality(Qt.NonModal) m.setText(text) m.setWindowTitle(title) m.setAttribute(Qt.WA_DeleteOnClose, True) m.setIcon(icon) m.show() center_widget_on_screen(m)
def report_missing_dependencies(self): """Show a QMessageBox with a list of missing hard dependencies.""" missing_deps = dependencies.missing_dependencies() if missing_deps: InstallerMissingDependencies(missing_deps) # We change '<br>' by '\n', in order to replace the '<' # that appear in our deps by '<' (to not break html # formatting) and finally we restore '<br>' again. missing_deps = (missing_deps.replace('<br>', '\n'). replace('<', '<').replace('\n', '<br>')) message = ( _("<b>You have missing dependencies!</b>" "<br><br><tt>%s</tt><br>" "<b>Please install them to avoid this message.</b>" "<br><br>" "<i>Note</i>: Spyder could work without some of these " "dependencies, however to have a smooth experience when " "using Spyder we <i>strongly</i> recommend you to install " "all the listed missing dependencies.<br><br>" "Failing to install these dependencies might result in bugs." " Please be sure that any found bugs are not the direct " "result of missing dependencies, prior to reporting a new " "issue." ) % missing_deps ) message_box = QMessageBox(self) message_box.setIcon(QMessageBox.Critical) message_box.setAttribute(Qt.WA_DeleteOnClose) message_box.setAttribute(Qt.WA_ShowWithoutActivating) message_box.setStandardButtons(QMessageBox.Ok) message_box.setWindowModality(Qt.NonModal) message_box.setWindowTitle(_('Error')) message_box.setText(message) message_box.show()