Now that our program is running, we can start implementing the user interface (UI). A typical PyQt application will make use of Qt Designer to store the application's UI in a template file, which is then compiled into a Python module for use within your application.
As it would take many pages to describe how to use Qt Designer to lay out our window with its toolbar and menus, we're going to cheat and create our user interface directly within Python. At the same time, however, we'll create our UI module as if it was created using Qt Designer; this keeps our application's UI separate, and also shows how our application would work if we were to use Qt Designer to design our user interface.
Create a new module called