# PyQt

## Boiler Plate

Below is boiler plate code for the controller when you are working with a PyQt UI file generated from QT Designer.

```{literalinclude} ./python_files/pyqt_boilerplate.py
:linenos:
```

## Creating a timer

Below is code for a simple timer app using PyQt with code generated from QT Designer.

### Controller (main) file

```{literalinclude} ./python_files/timer.py
:linenos:
```

### View (UI) file

This has been generated from a QT Designer file.

```{literalinclude} ./python_files/ui_timer.py
:linenos:
```