A simple desktop calculator built with Python and PyQt6. It features a clean user interface and basic arithmetic functionalities.
Calculator's Graphical User Interface
- Basic Arithmetic Operations: Allows addition, subtraction, multiplication, and division
- User-friendly Interface: Features a clear layout with large, easily clickable buttons and a display area for input and results
- Responsive Design: Automatically handles user input errors such as division by zero (and calls you a moron!)
- MainApp class serves as an engine, which boots the whole app up
- UI class is responsible for rendering interactible GUI
- Logic class handles the business logic of the app
- Button class in a template for Button objects rendered in the interface
This structure promotes modularity, reusability and single responsibility design principles.
To run the app, ensure you have the following:
- Python 3.6 or higher
- PyQt6
- Install PyQt6 if not already installed
- Clone or download this repository to your local machine
- Navigate to the directory containing the calculator code
- Run the script using Python:
python main.py
Ensure the name of the file is main.py - the app will not work otherwise