Skip to main content

Package to construct Qt widgets from dataclasses

Project description

DaWiQ - Dataclass Widget for Qt

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
from typing import Tuple

@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.

Documentation

Documentation can be found on Read the Docs:

https://dawiq.readthedocs.io/

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

dawiq-0.1.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

dawiq-0.1.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file dawiq-0.1.0.tar.gz.

File metadata

  • Download URL: dawiq-0.1.0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for dawiq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 01ab4fa4e2636fcbef3bacb8f803d7153301ed93afb1e28da7846c1596feeb82
MD5 5bfc88716758a7b079a0f2fdbbae773a
BLAKE2b-256 d9d1970bc9ddaf65642fe1bbfed2ac8cb0141dc9866c8acd9d242694979729c4

See more details on using hashes here.

File details

Details for the file dawiq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dawiq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for dawiq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0b6a4715c41829a5f948c443561fc51629a6d70d83e2797428df8b92aaba693
MD5 85e3a1ba44337fe54f19475807a518f4
BLAKE2b-256 b647fbe83f216fdb32ab2f3bbbad2591bf46ba7f4ac3f2073a7c856c6fc2bd79

See more details on using hashes here.

Supported by

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