Description:
Base dialog class built on QDialog.
Supports modal and non-modal dialogs.
parent (QWidget): Parent windowtitle (str): Dialog titlesize (tuple): Width and heightmodal (bool): Whether the dialog is modalopen_dialog() – Opens the dialogclose_dialog() – Closes the dialogA dialog window.
Description: Displays a simple message dialog with an OK button.
MessageDialog(parent, "Hello World").open_dialog()
A modal message dialog.
Description: Displays a confirmation dialog with Yes / No options.
result = ConfirmDialog.ask(parent, "Are you sure?")
if result:
print("User confirmed")
ask(parent, message, title="Confirm")True if accepted.
Boolean result.
Description: Displays a dialog that asks the user for text input.
value = InputDialog.get(parent, "Enter your name:")
print(value)
value() – Returns the entered textget(parent, label, title="Input")None.
User-entered text or None.
Description: A static helper class that provides quick access to common dialogs.
Dialogs.message(parent, "Hello!")
confirmed = Dialogs.confirm(parent, "Continue?")
text = Dialogs.input(parent, "Your name:")
message(parent, text) – Shows a message dialogconfirm(parent, text) – Returns True / Falseinput(parent, text) – Returns text or NoneDialog results.