PyQt5 Data Entry Form
In this tutorial we are going to learn how to build a multi-function data entry form to log expenses and as well as create a pie chart to display expense spending allocation.
Things we will be learning throughout this tutorial:
- Build a simple window application (QMainWindow)
- A table to track various of expenses (QTableWidget)
- Input fields to enter description and price (QLineEdit)
- Push Buttons to perform various actions (QPushButton)
- Data Validation to ensure both description and price are provided
- A pie chart to visually display expense allocation
- Menu items to export table to a CSV file and quit application
Python Code Snippet
= RESTART: C:\Users\frank.smith\Documents\Python Scripts\Expenses data entry Form.py
Traceback (most recent call last):
File “C:\Users\frank.smith\Documents\Python Scripts\Expenses data entry Form.py”, line 9, in
from PyQt5.QtChart import QChart, QChartView, QPieSeries
ModuleNotFoundError: No module named ‘PyQt5.QtChart’