Skip to content

Commit

Permalink
Calculator App v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sobhan-SRZA committed Jul 26, 2023
1 parent 5d5d58a commit 7059007
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Sobhan
Copyright (c) 2023 Sobhan-SRZA(Mr.SIN RE#1528)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# Calculator Application
A calculator app build with python and using QT library.

# How to use?
- first of all open `install.cmd` to install all libraries.
- open cmd from source path then send this `python src/main.py`

Enjoy ❤
Build with love and hard work

© Sobhan-SRZA
5 changes: 5 additions & 0 deletions install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
color 0a
:run
python -m pip install -r requirements.txt
goto run
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PyQt6
28 changes: 28 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sys
from PyQt6 import QtGui
from PyQt6.QtGui import QFont
from PyQt6.QtWidgets import QLabel, QWidget, QVBoxLayout, QApplication
from PyQt6.QtCore import QTimer, Qt

class Window(QWidget):
def __init__(self):
super().__init__()
layout = QVBoxLayout()
self.label = QLabel()
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.label.setFont(QFont("calibri", 40, -1, False))
layout.addWidget(self.label)
self.newLabel = QLabel()
self.newLabel.setText("© Sobhan-SRZA")
self.newLabel.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.newLabel.setFont(QFont("arial", 20, -1, False))
layout.addWidget(self.newLabel)
self.setWindowTitle("Calculator Application")
self.setWindowIcon(QtGui.QIcon('icon.png'))
self.setGeometry(100, 100, 800, 400)
self.setLayout(layout)

app = QApplication(sys.argv)
window = Window()
window.show()
app.exec()

0 comments on commit 7059007

Please sign in to comment.