### Summary
This presentation is a practical guide to getting started with PyQt5
for building desktop applications. It covers installation, the use of
the Qt Designer tool for visual layout, and the basics of connecting
the designed interface to Python code.
#### Key Topics Covered:
1. **PyQt5 Installation:**
* Instructions to install the necessary packages using `pip`:
* `pip install pyqt5` (the main library)
* `pip install pyqt5-tools` (includes Qt Designer)
2. **Qt Designer:**
* Introduces **Qt Designer**, a drag-and-drop tool for creating
GUI layouts without writing code.
* Explains how to locate the `[Link]` file within the
Anaconda environment directory and recommends creating a
desktop shortcut for easy access.
* Shows the Qt Designer interface, highlighting the widget box,
form area, and object inspector.
3. **PyQt5 Window Types:**
* Explains the three main classes for creating windows:
* **`QMainWindow`**: For full-featured main applications
(with menus, toolbars, status bars).
* **`QDialog`**: For pop-up dialog windows.
* **`QWidget`**: A generic base class for other windows or
custom widgets.
4. **Basic "Hello World" Program:**
* Provides a simple code example to create a basic window with
a "Hello World!" label using `QWidget`, demonstrating the
fundamental structure of a PyQt5 application.
5. **Connecting UI Files to Code:**
* Demonstrates the two main methods for using a GUI designed
in Qt Designer:
* **Dynamic Loading:** Using `[Link]('[Link]')` to load the
`.ui` file created by Qt Designer at runtime.
* **Converting to Python:** Implies converting the `.ui` file to
a `.py` file (a common practice) and then importing it into your main
code, as shown in a more complex example.
6. **Complex Example & Project Idea:**
* Shows a more advanced code structure for a hypothetical
"Admin" dialog (`AdminInfoProcessForm`), which connects button
clicks to functions (though the functions themselves are just `pass`
placeholders).
* Concludes by proposing the creation of a **Calculator** as a
practical project, showing a mockup of its design.
#### Overall Purpose:
The goal of this lecture is to bridge the gap between Python scripts
and user-friendly desktop applications. It provides the initial steps
for students to design application windows visually with Qt Designer
and then bring them to life with Python code using PyQt5, setting
the stage for building functional GUI projects like a calculator.