qudi.util.uic.loadUi

qudi.util.uic.loadUi(file_path, base_widget)[source]

Compiles a given .ui-file at <file_path> into python code. This code will be executed and the generated class will be used to initialize the widget given in <base_widget>. Creates a temporary file in the systems tmp directory using the tempfile module. The original .ui file will remain untouched.

WARNING: base_widget must be of the same class as the top-level widget in the .ui file.

Compatible subclasses of the top-level widget in the .ui file will also work.

Parameters:
str

file_path: The full path to the .ui-file to load

object

base_widget: Instance of the base widget represented by the .ui-file

file_path
base_widget
Returns: