Reusable PyQt UI toolkit primitives for SLI desktop tools.
Project description
SLI UI Toolkit
Reusable PyQt6 widgets and UI infrastructure for compact desktop tools.
SLI stands for Shared Lightweight Interface. The toolkit was extracted from Improve-ImgSLI and Tkonverter, but host-specific icons, translations, resources, and business logic stay outside the library.
What Is Included
- custom-painted compact controls: buttons, inputs, switches, sliders, labels;
- a unified
Buttonsystem with icons, text, toggle, scroll, menu, long-press, ripple, and multi-region split layouts; - reusable composite widgets: flyouts, dialog shells, markdown help, timelines, toasts, lists, charts;
- theme-aware painting through
ThemeManagertokens; - app-injected hooks for icons, i18n, overlay placement, and timing.
Install
For development from this repository:
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
For use as a dependency:
python -m pip install sli-ui-toolkit
Run The Demo
From the repository root:
python -m demo
The demo opens a PyQt window with widget pages for buttons, inputs, lists, dialogs, flyouts, charts, feedback, and miscellaneous primitives.
If you run on a headless machine, set Qt's platform first:
QT_QPA_PLATFORM=offscreen python -m demo
Run Tests
pytest tests/
The test suite uses pytest-qt and defaults to offscreen Qt through
tests/conftest.py.
Basic Use
Most application code should import from sli_ui_toolkit.widgets.
from PyQt6.QtWidgets import QApplication, QVBoxLayout, QWidget
from sli_ui_toolkit.theme import ThemeManager
from sli_ui_toolkit.widgets import Button, ComboBox
app = QApplication([])
theme = ThemeManager.get_instance()
theme.set_theme("light", app)
window = QWidget()
layout = QVBoxLayout(window)
save = Button("save", text="Save", variant="surface")
mode = ComboBox()
mode.addItems(["Fast", "Balanced", "Quality"])
layout.addWidget(save)
layout.addWidget(mode)
window.show()
app.exec()
App Configuration Hooks
Hosts can inject app-specific behavior at startup:
configure_icon_resolver(...)Supplies icon lookup for app icon enums, names, or resources.configure_toolkit(...)Supplies overlay placement and timing defaults for flyouts and popups.configure_i18n(...)Supplies translation roots and language handling.
Minimal apps can use bundled toolkit icons and skip these hooks. Larger host apps should configure them once during startup.
Public Import Layers
sli_ui_toolkitBootstrap/configuration helpers and common primitives.sli_ui_toolkit.widgetsMain public widget catalog. Prefer this for application UI.sli_ui_toolkit.themeThemeManager.sli_ui_toolkit.iconsIcon resolver configuration.sli_ui_toolkit.i18nTranslation manager and helpers.sli_ui_toolkit.managersFlyout and timer helpers.sli_ui_toolkit.servicesUtility services such as prewarm helpers.
Everything under sli_ui_toolkit.ui... is implementation detail first. Use it
inside toolkit internals, or only when no public export exists yet.
Documentation
Development Notes
- Keep host-app behavior outside the toolkit. Pass behavior through callbacks, signals, configuration hooks, or plain data objects.
- Resolve colors and sizes through
ThemeManager, widget properties, or documented tokens. - Update docs when changing public widget behavior or public API.
- Run
pytest tests/before publishing or tagging a release.
Caveats
ComboBoxis custom-painted; it is not a fullQComboBoxdrop-in replacement.- The toolkit is designed around custom-painted controls, not QSS-skinned stock widgets.
- Light and dark themes are both first-class. Avoid hard-coded colors in custom widgets; use theme tokens.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sli_ui_toolkit-0.2.13.tar.gz.
File metadata
- Download URL: sli_ui_toolkit-0.2.13.tar.gz
- Upload date:
- Size: 232.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c237e7f584b3280e3a782450266b548b848484485f71f083fa32520fd13401e
|
|
| MD5 |
34ad5ffc65af2364f5f9240a3e254ad3
|
|
| BLAKE2b-256 |
9f7c454e9251f725e87a73aeabdc3858485262bdbd9bc0020562642424cf7fa9
|
Provenance
The following attestation bundles were made for sli_ui_toolkit-0.2.13.tar.gz:
Publisher:
publish.yml on Loganavter/sli-ui-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sli_ui_toolkit-0.2.13.tar.gz -
Subject digest:
5c237e7f584b3280e3a782450266b548b848484485f71f083fa32520fd13401e - Sigstore transparency entry: 1841253722
- Sigstore integration time:
-
Permalink:
Loganavter/sli-ui-toolkit@a9132cabc5367cea76797e0b1cbaa04c28016dab -
Branch / Tag:
refs/tags/v0.2.13 - Owner: https://github.com/Loganavter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9132cabc5367cea76797e0b1cbaa04c28016dab -
Trigger Event:
release
-
Statement type:
File details
Details for the file sli_ui_toolkit-0.2.13-py3-none-any.whl.
File metadata
- Download URL: sli_ui_toolkit-0.2.13-py3-none-any.whl
- Upload date:
- Size: 271.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a0a338fd35775fcc5c63128355b5c7eee7add5af4e562e2d95ed96417855db4
|
|
| MD5 |
9e5e1e57d838f40ecfa53e131a5e3696
|
|
| BLAKE2b-256 |
3dcaa9fd61a5b7237f6e35a125f365fb50b014eb1714ab329ab2bb22991d9c70
|
Provenance
The following attestation bundles were made for sli_ui_toolkit-0.2.13-py3-none-any.whl:
Publisher:
publish.yml on Loganavter/sli-ui-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sli_ui_toolkit-0.2.13-py3-none-any.whl -
Subject digest:
7a0a338fd35775fcc5c63128355b5c7eee7add5af4e562e2d95ed96417855db4 - Sigstore transparency entry: 1841254258
- Sigstore integration time:
-
Permalink:
Loganavter/sli-ui-toolkit@a9132cabc5367cea76797e0b1cbaa04c28016dab -
Branch / Tag:
refs/tags/v0.2.13 - Owner: https://github.com/Loganavter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9132cabc5367cea76797e0b1cbaa04c28016dab -
Trigger Event:
release
-
Statement type: