Skip to main content

DeMille Lab Widgets for PyQt5

Small, reusable PyQt5 widgets developed for laboratory control-system interfaces.

The package improves several common Qt interactions, including preventing spin boxes and combo boxes from changing when the mouse wheel is used while the widget does not have focus. It also provides cursor-position-aware numeric stepping, scientific-notation input, convenience layouts, a configured plotting widget, and a table widget with frozen rows and columns.

Installation

Once the first release is published to PyPI:

python -m pip install demille-lab-widgets-pyqt5

Usage

from demille_lab_widgets import NewBox, NewDoubleSpinBox, NewSpinBox

voltage = NewDoubleSpinBox(range=(-10.0, 10.0), decimals=3, suffix=" V")
shots = NewSpinBox(range=(0, 100_000))
controls = NewBox(layout_type="form")
controls.frame.addRow("Voltage", voltage)
controls.frame.addRow("Shots", shots)

The public classes are:

  • NewBox
  • NewComboBox
  • NewSpinBox
  • NewDoubleSpinBox
  • ScientificDoubleSpinBox
  • NewPlot
  • NewScrollArea
  • FlexibleGridLayout
  • NewTableWidget

Behavior

NewSpinBox, NewDoubleSpinBox, and NewComboBox ignore mouse-wheel changes until they have keyboard focus. The numeric spin boxes also change their step size according to the cursor position. Keyboard tracking is disabled so typed values are committed when Enter is pressed or focus is lost.

Development

Create a virtual environment, then install the package in editable form:

python -m pip install -e ".[test]"
python -m unittest discover -s tests -v
python -m build
python -m twine check dist/*

Release status

The package implementation is maintained independently in this repository and is distributed under the MIT License. Runtime dependencies retain their own licenses; see Third-party notices.

Acknowledgements

The widget collection was originally developed for CeNTREX by Olivier Grasdijk and Jakob Kastelic. Qian Wang subsequently brought it into the SrF control software and developed additional improvements. Shaozhen Yang later adapted it for FrAg, extracted it into this standalone package, coordinated the licensing review, and prepared the public release. See the full project history and contributors.

Download files

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

Source Distribution

demille_lab_widgets_pyqt5-0.1.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

demille_lab_widgets_pyqt5-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file demille_lab_widgets_pyqt5-0.1.1.tar.gz.

File metadata

File hashes

Hashes for demille_lab_widgets_pyqt5-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb42a653c4a892917c22a55e084bc6c9d78c276ebf097aa771a62d1eb0c2aa70
MD5 02bc0f1379d0eccc9681d1389797fb5a
BLAKE2b-256 9fe63d8a9cfffd8a827d5db909cc83f866f5c1524b69183281859d869f3a8d4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for demille_lab_widgets_pyqt5-0.1.1.tar.gz:

Publisher: release.yml on DeMille-Group-FrAg/demille-lab-widgets-pyqt5

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file demille_lab_widgets_pyqt5-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for demille_lab_widgets_pyqt5-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2476fc9fda39c5d974ae29fca7d008d69abef13a79c912a32fa8fa68811a09b
MD5 f61f8bfb3485cd2c0a0c4f4e043c6a34
BLAKE2b-256 5b3819e976a54864f8cbf7ce249c00cbd38fecb8be11d40dc92f254b0e9a4446

See more details on using hashes here.

Provenance

The following attestation bundles were made for demille_lab_widgets_pyqt5-0.1.1-py3-none-any.whl:

Publisher: release.yml on DeMille-Group-FrAg/demille-lab-widgets-pyqt5

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.1 This release

2 files

0.1.0

2 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