class qtpyvcp.widgets.dialogs.base_dialog.BaseDialog(parent=None, ui_file=None, title=None, modal=None, popup=None, frameless=None, stay_on_top=None)[source]

Base Dialog

Base QtPyVCP dialog class.

This is intended to be used as a base class for custom dialogs, as well as a provider for use in YAML config files. This allows loading custom dialogs from .ui files without needing to write any python code.

You can launch dialogs using a Dialog Button or from a window menu item.


YAML config for loading a custom dialog called my_dialog from a .ui file named my_diloag.ui located in the same dir as the .yml file:

    provider: qtpyvcp.widgets.dialogs.base_dialog:BaseDialog
      ui_file: {{ file.dir }}/my_dialog.ui
      title: My Dialog Title    # optional, set the dialog title
      modal: false              # optional, whether the dialog is modal
      popup: false              # optional, whether the dialog is a popup
      frameless: false          # optional, whether the dialog is frameless
      stay_on_top: true         # optional, whether the dialog stays on top
  • parent (QWidget, optional) – The dialog’s parent window, or None.
  • ui_file (str, optional) – The path of a .ui file to load the dialog from. The ui base widget should be a QDialog.
  • title (str, optional) – The title to use for the dialog. This will override any title property set in QtDesigner.
  • modal (bool, optional) – Whether the dialog should be application modal. This will override any modality hints set in QtDesigner.
  • frameless (bool, optional) – Whether the window has a frame or not. If the window does not have a frame you will need some way to close it, like an Ok or Cancel button.
  • popup – (bool, optional) : Makes the dialog use a frame less window that automatically hides when it looses focus.
  • stay_on_top (bool, optional) – Sets the stay on top hint window flag. This overrides any window flags set in QtDesiger.

Load dialog from a .ui file.

The .ui file base class should be a QDialog.

Parameters:ui_file (str) – path to the .ui file to load.
setWindowFlag(flag, on)[source]

BackPort QWidget.setWindowFlag() implementation from Qt 5.9

This method was introduced in Qt 5.9 so is not present in Qt 5.7.1 which is standard on Debian 9 (stretch), so add our own implementation.

class qtpyvcp.widgets.dialogs.about_dialog.AboutDialog(*args, **kwargs)[source]
class qtpyvcp.widgets.dialogs.error_dialog.ErrorDialog(exc_info)[source]
class qtpyvcp.widgets.dialogs.offsets_dialog.OffsetsDialog(parent=None)[source]
class qtpyvcp.widgets.dialogs.open_file_dialog.OpenFileDialog(parent=None)[source]

NGC file chooser dialog.


This method is called right before the main application starts.


This method is called right before the main application ends.

class qtpyvcp.widgets.dialogs.probesim_dialog.ProbeSim(parent=None)[source]