qtbricks.aboutdialog module

Help-About dialog for main GUI windows.

Purpose: Typically, every GUI has a “Help About” dialog displaying some information regarding the application, such as its name and version number, website, license, authors, and debug information.

Design principles: The dialog should be as self-contained and self-consistent as possible. The only crucial information that needs to be set from the outside is the package name.

Limitations: Handling of author/contributor names and email addresses is limited by how this information is stored in the setup.py file and read by the importlib.metadata module.

Some notes for developers

If you base the main window of your GUI application on the qtbricks.mainwindow.MainWindow class and set the qtbricks.mainwindow.MainWindow.package_name attribute accordingly, you are basically set up.

If, however, you want to change or extend the texts displayed in the three tabs, the easiest way is to change each of the respective methods returning the text to be displayed, namely:

  • AboutDialog._create_about_text()

  • AboutDialog._create_authors_text()

  • AboutDialog._create_debug_info_text()

Each of these non-public methods returns a text that is set as text of the underlying display widget. Hence, you can use a reduced set of HTML tags to properly format the text.

Furthermore, if you need more control, you may think of using Jinja as template engine.

Module documentation

class qtbricks.aboutdialog.AboutDialog(parent=None, package_name='', logo='')

Bases: QDialog

Typical “Help About” Dialog of the main window of a GUI application.

Most GUI main windows have a “Help About” dialog displaying some information regarding the application, such as its name and version number, website, license, authors, and debug information.

package_name

Name of the package

This information is crucial for displaying the relevant package metadata, such as version, short description, authors, and licence.

Type:

str

Path to logo image file

Type:

str

Parameters:
  • parent (PySide6.QtWidgets.QWidget) –

    Parent of the dialog

    The dialog will usually be centered upon the parent.

  • package_name (str) –

    Name of the package

    This information is crucial for displaying the relevant package metadata, such as version, short description, authors, and licence.

  • logo (str) – Path to logo image file