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.0.tar.gz (11.9 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.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for demille_lab_widgets_pyqt5-0.1.0.tar.gz
Algorithm Hash digest
SHA256 650d38bd3a0e387ccdd2598df2668d07693b7d7d60f485028505abe0238e0a02
MD5 f9dc9bda1e2c23c97848a62d49ec5b1d
BLAKE2b-256 173a32680bd848852627fd7476b7d35f11b9d3fca4805f8d95b0c248f2c7aba8

See more details on using hashes here.

Provenance

The following attestation bundles were made for demille_lab_widgets_pyqt5-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for demille_lab_widgets_pyqt5-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af352209361c48167e873917620a4dbd88fa8bbbb6560f426c5961a69953c015
MD5 eee3d184ffc6b7817b1d0c7e63c851cd
BLAKE2b-256 88baf9ea0ab6f8cafa92b095d83ba75c2ca549e2f099c13cb8447f9d67990216

See more details on using hashes here.

Provenance

The following attestation bundles were made for demille_lab_widgets_pyqt5-0.1.0-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

0.1.1

2 files

This release

0.1.0 This release

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