/VPyFormGenerator

This Library is built on PyQt framework and will help developers create GUI for their application with just one line of codes. It also support 2 way binding for objects

Primary LanguagePythonMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

VPyGUIGenerator

A simple and useful library to help you create GUI for your application with just 1 line of code in Python

Introduction Demo (Create GUI using fields
Support property, customize widgets, New Widgets Demo
Size support, List/Dict filtering, SimpleGrid Demo
List/Dict ClearAll option, CRUD support in SimpleGrid
Filtering option in SimpleGrid Demo
· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

[Product Name Screen Shot] [Product Name Screen Shot] [Product Name Screen Shot] [Product Name Screen Shot] [Product Name Screen Shot] [Product Name Screen Shot] [![Product Name Screen Shot][product-screenshot7]]

Creating GUI for Python application, in my opinion, is a tedious task and sometimes it's really hard to create and manage forms and dialogs inside an application. Although some library such as PyQt and PySide make it much easier to create GUI compare to TKinter, developers should create GUI using QtDesigner to write it completely in code. Most of the time we need to create a form to show current state of an object and let user modify the content(2-way binding). This library will help us create GUI for objects with just writing 1 line of code. GUI created based on object fields and bindings also created. So user can see current state of object(as it's in the screenshot) and change the object state through that form.

(back to top)

Built With

  • Python
  • PyQt

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them. Download and install Python on your machine

  • pyqt
    pip install pyqt

Installation

  1. Clone the repo
    git clone https://github.com/vRFEducation/VPyFormGenerator
  2. Create a class in your application such as:

class Person: def init(self, name, age, height): self.name = name self.age = age self.height = height self.is_male = True self.register_date = date.today() now = datetime.now() self.last_login = now self.break_time = now.time() self.courses = ["DB", "DS", "Python"] self.work_hours = {"Jan": 100, "Feb": 50, "Mar": 120} ```

  1. Import the library:
     from  VPyFormGenerator.VPyGUIGenerator import VPyGUIGenerator
4. Create PyQt app and call create_gui method of library:
 ```sh
import sys
from PyQt6.QtWidgets import QApplication
app = QApplication(sys.argv)
dialog = VPyGUIGenerator.create_gui(p)
dialog.show()
app.exec()
  1. Enjoy the dialog created!!!

(back to top)

Usage

Most of the time Python developers use console for interacting with their application objects and it's totally a nightmare to create GUI for Python applications. This library will help developers create simple and useful GUI for their application's objects in order to interact with them(view current state and change their values).

(back to top)

Roadmap

  • Support propery inside Python classes
    • Customize default widgets for known types
  • Add flatern option for complex objects
  • Support PySide

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Vahid Rahmanifard - rahmanifard@live.com

Project Link: https://github.com/vRFEducation/VPyFormGenerator

(back to top)

(back to top)