Dialog

Function to display a dialog to the user and receive feedback!

Functions:

get_gui_instance()

Retreive the currently running instance of the GUI

init_logger(module_name[, log_level, …])

Initialize a logger for logging events.

pop_dialog(message[, sub_message, modality, …])

Creates a dialog box to display a message.

pvp.gui.widgets.dialog.pop_dialog(message: str, sub_message: str = None, modality: <class 'PySide2.QtCore.Qt.WindowModality'> = PySide2.QtCore.Qt.WindowModality.NonModal, buttons: <class 'PySide2.QtWidgets.QMessageBox.StandardButton'> = PySide2.QtWidgets.QMessageBox.StandardButton.Ok, default_button: <class 'PySide2.QtWidgets.QMessageBox.StandardButton'> = PySide2.QtWidgets.QMessageBox.StandardButton.Ok)[source]

Creates a dialog box to display a message.

Note

This function does not call .exec_ on the dialog so that it can be managed by the caller.

Parameters
  • message (str) – Message to be displayed

  • sub_message (str) – Smaller message displayed below main message (InformativeText)

  • modality (QtCore.Qt.WindowModality) – Modality of dialog box - QtCore.Qt.NonModal (default) is unblocking, QtCore.Qt.WindowModal is blocking

  • buttons (QtWidgets.QMessageBox.StandardButton) – Buttons for the window, can be | ed together

  • default_button (QtWidgets.QMessageBox.StandardButton) – one of buttons , the highlighted button

Returns

QtWidgets.QMessageBox