Skip to main content

Reusable PySide6 slider widgets for scientific applications

Project description

pyside6-sliders

Reusable PySide6 slider widgets for scientific applications.

Built from real scientific software, these sliders are production-tested and support float/int values, range selection, array editing, custom labels with optional LaTeX rendering, right-click context menus, and configurable styling.

Components

Widget Description
FloatSlider Single float-value slider with label, unit, and value display
IntSlider Single integer-value slider
ArraySlider Multi-value array slider
FloatRangeSlider Dual-handle float range slider
IntRangeSlider Dual-handle integer range slider
MultiVariableSlider Array of float values sharing a single range

Installation

pip install pyside6-sliders

This package depends on pyside6-widgets which will be installed automatically.

Quick Start

FloatSlider

from pyside6_sliders import FloatSlider

slider = FloatSlider(
    name=r"T_1",           # supports LaTeX math
    unit="s",
    val=1.0,
    val_min=0.0,
    val_max=10.0,
    val_fmt="{:.3g}",
)
slider.valueChanged.connect(lambda v: print(f"Value: {v}"))

IntSlider

from pyside6_sliders import IntSlider

slider = IntSlider(
    name="N",
    unit="",
    val=10,
    val_min=1,
    val_max=100,
)

FloatRangeSlider

from pyside6_sliders import FloatRangeSlider

slider = FloatRangeSlider(
    name=r"\nu",
    unit="MHz",
    val=(1.0, 5.0),
    val_min=0.0,
    val_max=10.0,
)
slider.valueChanged.connect(lambda v: print(f"Range: {v}"))

MultiVariableSlider

import numpy as np
from pyside6_sliders import MultiVariableSlider

slider = MultiVariableSlider(
    name=r"v",
    unit="km/s",
    val=np.array([1.0, 2.0, 3.0]),
    val_min=0.0,
    val_max=10.0,
)

Features

  • Float and integer single-value sliders
  • Dual-handle range sliders
  • Array/multi-variable sliders
  • Math label rendering via Matplotlib (optional LaTeX)
  • Right-click context menus for editing value, range, and config
  • Configurable label sizes and display formats
  • Out-of-range dialogs with clamp/extend options
  • Clean signal API: valueChanged, defaultChanged, configChanged

Requirements

  • Python 3.10+
  • PySide6 >= 6.5
  • numpy >= 1.24
  • pyside6-widgets >= 0.1.0

License

MIT License — see LICENSE for details.

Author

Vahid Anari — GitHub · LinkedIn

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

pyside6_sliders-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pyside6_sliders-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyside6_sliders-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pyside6_sliders-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25286ddfb739388ac1b9709b14cd014ba29d47f6730cba71ab544c54e4592bda
MD5 757115501f7cddfc7f7936f0d3f738e8
BLAKE2b-256 d0f10244c23f33dc87e8895637d8b9034c0148e9f4d9f3d206adcb69af6f2472

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyside6_sliders-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37d094362a363f64babd859f07be6fc5275c38de3cb6ba2ea6a57b23b3b2c31d
MD5 d78d53afbd1854ef7fd661532408a0a7
BLAKE2b-256 09e5d9f5d6994dd43d4ff7ec935798a1cf5b8e577e628c5c507f8a7dc4ab076d

See more details on using hashes here.

Supported by

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