Giter VIP home page Giter VIP logo

basic-expense-tracker's Introduction

Basic-expense-tracker

This is a Python code for an Expense Tracker application built using PyQt5 GUI framework and SQLite database. The main functionality of the code is to provide a graphical interface for users to track their expenses by entering the date, name, title, and expense amount. The entered expenses are stored in a SQLite database for future reference. The application allows users to view their entered expenses and the total amount spent.

The code imports required PyQt5 and SQLite libraries and loads the user interface design from an external .ui file using the loadUi method. The class ExpenseTracker inherits from QMainWindow class and initializes the UI using the init_ui method. The UI consists of a table to display expenses, text boxes to enter expense details, buttons to submit and view expenses, and a label to display the total expenses.

The create_database_table method creates a new SQLite database table to store the expense details, if it does not already exist. The submit_expense method retrieves the entered expense details and inserts them into the SQLite database table. It also updates the expense table in the UI by inserting a new row with the entered details. The view_expenses method retrieves all the entered expenses from the SQLite database table and displays them in the expense table in the UI. It also calculates the total amount spent and displays it in the label.

The if name == 'main': block initializes a new PyQt5 QApplication and creates an instance of the ExpenseTracker class. It then runs the event loop using the app.exec_() method, which listens for user events and updates the UI accordingly.

basic-expense-tracker's People

Contributors

jish123k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.