Skip to main content

Convert JSON schemas into dynamic PySide6 GUI forms with no manual UI coding needed.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

JsonToQt

Convert JSON schemas into dynamic PySide6 GUI forms - no manual UI coding needed!

⚠️ This documentation is possibly outdated or false! New documentation coming soon™️


Overview

JsonToQt lets you define Qt-based forms declaratively in JSON. It parses the schema and generates forms with:

  • Buttons, radio buttons, checkboxes
  • Combo boxes, line edits, text edits
  • Spin boxes (int & double), and labels
  • Built-in support for wiring button callbacks by name

Use JsonToQt to speed up GUI prototyping, build dynamic config panels, or integrate with low-code workflows.


Features

  • Supports common PySide6 widgets from a JSON schema
  • Bind button callbacks by name to Python functions
  • Easily extendable for more widgets or custom behaviors
  • Simple to use with minimal dependencies (just PySide6)

Installation

pip install jsontoqt


Usage

Define your form schema (example.json):

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "title": "Your Name"
    },
    "age": {
      "type": "integer",
      "title": "Age",
      "minimum": 0,
      "maximum": 120
    },
    "bio": {
      "type": "string",
      "title": "Short Bio",
      "widget": "textarea"
    },
  }
}

Note that it must be a valid schema!

Load the schema, create the form, bind callbacks, and run the app:

import json
from pathlib import Path
from PySide6.QtWidgets import QApplication
from jsontoqt import JsonForm

def on_submit():
    print("Submit button clicked!")

def on_cancel():
    print("Cancel button clicked!")

app = QApplication([])

# Create the form
form = JsonForm(schema)

form.show()

app.exec()

Requirements

  • Python 3.8+
  • jsontoqt

License

MIT License


Contribution

Contributions and issues are welcome! Feel free to open a PR or suggest new features.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsontoqt-0.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsontoqt-0.3.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file jsontoqt-0.3.0.tar.gz.

File metadata

  • Download URL: jsontoqt-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for jsontoqt-0.3.0.tar.gz
Algorithm Hash digest
SHA256 eee980b68ca52e8d049d9a2c0eff425fe2c3e1e9390bef63bf78b570bc2f3b3b
MD5 c89484d47a349c442aaaf98e1623914e
BLAKE2b-256 12157ec0da92aca70b7a417283fa1bd324f6106e47ab5af720969ed1c8fc215a

See more details on using hashes here.

File details

Details for the file jsontoqt-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jsontoqt-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for jsontoqt-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e2960a2d16cb8ffdf24267431701505bb7657c6df5110221b3e1ce9258cbb24
MD5 5daa80f56106301a5a74dc3369f84ce1
BLAKE2b-256 e1a684caef540ef398a301e4294511e7c16dba0612312d341807107d8e4174f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page