Skip to main content

Subclassing PyQt5.QtWidgets to syncronize state in QSettings object.

Project description

configwidgets

Subclassing QWidgets to save the widget state in a QSettings Instance. A setup method links the widget to key within the QSettings instance. The value is loaded during setup and gets stored when the widget state changes. Without calling this method, the widget has no special behaviour.

See the following snippet for a minimal example:

from PyQt5.QtCore import QSettings
from configwidgets import ConfigCheckBox

config = QSettings()
checkBox = ConfigCheckBox()
checkBox.setup(config, "checkBox")

setup

install the package via pip:

pip install configwidgets

The full documentation can be found under configwidgets documentation The source code can be found under configwidgets repository

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

configwidgets-1.2.0.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

configwidgets-1.2.0-py3-none-any.whl (19.7 kB view hashes)

Uploaded Python 3

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