Skip to main content

DaWiQ - Dataclass Widget with Qt

PyPI version Python Version Build Status Documentation Status License

DaWiQ is a Python package to generate Qt widget from dataclass.

It provides:

  • Dynamic construction of widget from dataclass
  • Customizing widget for user-defined type
  • Delegate and mapper for dataclass widget

The following Qt bindings are supported:

Usage

Here is a simple dataclass:

from dataclasses import dataclass

@dataclass
class DataClass:
    a: int
    b: bool

DaWiQ can build a widget from this dataclass. For PySide6 example,

from PySide6.QtWidgets import QApplication
from dawiq import dataclass2Widget
import sys

app = QApplication(sys.argv)
dataWidget = dataclass2Widget(DataClass)
dataWidget.show()
app.exec()
app.quit()

This widget can be mapped to item model for storing the data. More examples are provided in the documentation.

Installation

DaWiQ can be installed from PyPI.

$ pip install dawiq

To install from GitHub source, clone the repository with git and install with pip.

$ git clone https://github.com/JSS95/dawiq.git
$ cd dawiq
$ pip install .

DaWiQ does not specify the Qt binding requirement, therefore you must manually install one.

Documentation

DaWiQ is documented with Sphinx. Documentation can be found on Read the Docs:

https://dawiq.readthedocs.io/

If you want to build the document yourself, get the source code and install with [doc] option. Then go to doc directory and build the document.

$ pip install .[doc]
$ cd doc
$ make html

Document will be generated in build/html directory. Open index.html to see the central page.

Metadata

Release files for dawiq 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dawiq 1.0.1
File Size Uploaded
dawiq-1.0.1.tar.gz 21.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dawiq 1.0.1
File Interpreter ABI Platform
dawiq-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 46.1 kB

Release files / dawiq-1.0.1.tar.gz

Download URL dawiq-1.0.1.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
98497722c39be2cb9cd21b00f4d43083fb6c4f39dd9cbd154f6f0dd94d1bd9ea
BLAKE2b-256 checksum
How to use checksums
4edadf30cce6d57f1008cbf497bba4dec93dee94adda0b088992825313c9d4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / dawiq-1.0.1-py3-none-any.whl

Download URL dawiq-1.0.1-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a401d5e86ca79849c58457a71227275a50b32c2da1c776ed08d031c9bb8fb61
BLAKE2b-256 checksum
How to use checksums
c3dcdb86a1e44305122bd97c4f0a1390123ced21eb89d0a9bfe469c9bae9c6cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page