https://github.com/lucaspmartins/simple-python-calculator
This repository contains a Simple Python-based calculator application built using the PySide6 library.
https://github.com/lucaspmartins/simple-python-calculator
pyside6 python-3 qtdesigner
Last synced: 3 months ago
JSON representation
This repository contains a Simple Python-based calculator application built using the PySide6 library.
- Host: GitHub
- URL: https://github.com/lucaspmartins/simple-python-calculator
- Owner: LucasPMartins
- Created: 2024-11-13T19:28:36.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-07T10:41:48.000Z (6 months ago)
- Last Synced: 2025-03-27T12:14:41.286Z (3 months ago)
- Topics: pyside6, python-3, qtdesigner
- Language: Python
- Homepage:
- Size: 47 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://git.io/typing-svg)
## ❔ About
This repository contains a Simple Python-based calculator application built using the PySide6 library for the graphical user interface. The application features a grid of buttons for input, a display for showing the current input and results, and an info label for additional information.
![]()
![]()
### Features
- **Basic Arithmetic Operations**: Supports addition, subtraction, multiplication, division, and exponentiation.
- **Error Handling**: Displays error messages for invalid inputs, zero division, and overflow errors.
- **Responsive UI**: Adjusts the size of the window and buttons based on the content.
- **Custom Styling**: Uses `qdarkstyle` for a dark theme and additional custom styles for buttons.### Project Structure
- **main.py**: The entry point of the application. It sets up the main window, display, info label, and buttons grid.
- **main_window.py**: Defines the `MainWindow` class, which is the main container for the application's widgets.
- **display.py**: Defines the `Display` class, a custom `QLineEdit` widget for showing the current input and results.
- **info.py**: Defines the `Info` class, a custom `QLabel` widget for showing additional information.
- **buttons.py**: Defines the `Button` and `ButtonsGrid` classes. `Button` is a custom `QPushButton`, and `ButtonsGrid` manages the layout and functionality of the calculator buttons.
- **utils.py**: Contains utility functions for validating input.
- **styles.py**: Contains the custom styles for the application.
- **variables.py**: Defines constants used throughout the application, such as font sizes and colors.### How to Run
1. **Clone the repository**:
```sh
git clone
cd
```2. **Create a virtual environment**:
```sh
python -m venv venv
```3. **Activate the virtual environment**:
- On Windows:
```sh
venv\Scripts\activate
```
- On macOS/Linux:
```sh
source venv/bin/activate
```4. **Install the dependencies**:
```sh
pip install -r requirements.txt
```5. **Run the application**:
```sh
python main.py
```## 🛠 Tools:




## 👨💻 Programming Language

![]()