Skip to main content

A lightweight and extensible styled UI component kit for PySide6 applications.

Project description

PySide6StyleKit

PySide6 アプリのための軽量で拡張性の高いスタイル済み UI コンポーネントキット。
A lightweight and extensible styled UI component kit for PySide6 applications.


特徴 / Features

  • 統一テーマ(ライト/ダーク/背景色)
    Unified themes (light, dark, background-aware)
  • スタイル済みウィジェット(Label / LineEdit / Button / Indus Alternate Button / Indus Lamp / Indus Momentary Button / CheckBox / RadioButton / ComboBox / Slider / ProgressBar / TextEdit / GroupBox など)
    Styled widgets such as Label, LineEdit, Button, Indus Alternate Button, Indus Lamp, Indus Momentary Button, CheckBox, RadioButton, ComboBox, Slider, ProgressBar, TextEdit, and GroupBox
  • GroupBox タイトルの自動中央揃え(フォントサイズ変更に追随)
  • 数値バリデーション(int / float / range)
    Robust numeric validation (int, float, range)
  • エラー表示の柔軟な制御(枠線のみ・メッセージ表示)
    Flexible error signaling (border-only or message)
  • 拡張しやすいモジュール構造
    Modular and extensible architecture
  • 実用的なサンプルコード付き
    Includes practical example scripts

v0.2.1 更新内容 / What's New

  • StyledLineEditQLineEdit ベースに整理(内部合成から継承へ)
  • numeric_range 入力の範囲制御を強化(範囲外入力を抑制)
  • エラーメッセージは show_error("...") 呼び出し時にツールチップ表示
  • examples/demo.py に Validate ボタンを表示

インストール / Installation

pip install pyside6stylekit

使い方 / Usage

examples/demo.pyexamples/demo_indus.py に基本的な使い方があります。
Basic usage is available in examples/demo.py and examples/demo_indus.py.

サポート widget / Supported widgets

  • StyledLabel
  • StyledLineEdit
  • StyledButton
  • StyledCheckBox
  • StyledRadioButton
  • StyledComboBox
  • StyledSlider
  • StyledProgressBar
  • StyledTextEdit
  • StyledGroupBox
  • IndusAlternateButton, IndusLamp, IndusMomentaryButton

※ さらに Theme 本体で色やサイズ設定を管理し、各 widget のスタイルを統一しています。

利用可能なカラーモード / Available color modes

  • Theme.light()
  • Theme.dark()
  • Theme(primary=<hex>, mode='light'|'dark', background='<hex>')

サポート色(utils/colors.py) / Supported colors

normalize_color で次のキーワードを16進色に変換します:

  • red: #ff0000
  • green: #00ff00
  • blue: #0000ff
  • black: #000000
  • white: #ffffff
  • gray: #808080
  • orange: #ffa500
  • yellow: #ffff00
  • purple: #800080
  • pink: #ffc0cb
  • sky: #87ceeb

normalize_color'#rrggbb' 形式や (r,g,b) 形式も受け付けます。

色サンプル / Color samples

from pyside6stylekit.utils.colors import normalize_color, adjust_color

print(normalize_color('sky'))       # #87ceeb
print(normalize_color((255,16,128)))  # #ff1080
print(adjust_color('#ff1080', 0.8))   # #cc0d66
from pyside6stylekit import Theme, StyledLabel, StyledLineEdit, StyledButton, StyledGroupBox

theme = Theme.light()

label = StyledLabel("Hello")
lineedit = StyledLineEdit("Range (0-120)", theme, mode="numeric_range", min_val=0, max_val=120)
button = StyledButton("Submit")

# GroupBox with adaptive title positioning
groupbox = StyledGroupBox("Settings", theme)

# Validation examples
lineedit.show_error("Value out of range")  # tooltip + red border
lineedit.show_error("")                    # clear error state

プロジェクト構造 / Project Structure

pyside6stylekit/
├─ pyside6stylekit/
│   ├─ utils/
│   │  ├─ __init__.py
│   │  └─ colors.py
│   ├─ widgets/
│   │  ├─ __init__.py
│   │  ├─ button.py
│   │  ├─ checkbox.py
│   │  ├─ combobox.py
│   │  ├─ groupbox.py
│   │  ├─ indus_alternate_button.py
│   │  ├─ indus_lamp.py
│   │  ├─ indus_momentary_button.py
│   │  ├─ label.py
│   │  ├─ lineedit.py
│   │  ├─ progressbar.py
│   │  ├─ radiobutton.py
│   │  ├─ slider.py
│   │  └─ textedit.py
│   ├─ __init__.py
│   ├─ presets.py
│   └─ theme.py
├─ examples/
│   ├─ demo.py
│   └─ demo_indus.py
├─ LICENSE
└─ README.md

ライセンス / License

MIT License © 2026 Mitsunori


作者 / Author

Noritama-Lab

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

pyside6stylekit-0.2.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

pyside6stylekit-0.2.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file pyside6stylekit-0.2.1.tar.gz.

File metadata

  • Download URL: pyside6stylekit-0.2.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyside6stylekit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 19def79364bb5ae10233c9ac6949bc4f3e692a1e9a8907e064bc58232651048b
MD5 c77ceb2404f6d7cd4a2450223ba39532
BLAKE2b-256 5353791b7ccf76eb0f306614f8bc1a6a6e2380e825f1210677f517f8c4795d71

See more details on using hashes here.

File details

Details for the file pyside6stylekit-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyside6stylekit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ab82baf472d79fbfd8d89ec813ccf94c9b706d04b6ed9c6e1d5070904e3299e
MD5 04731907e2f6b60de7ab661eb8eed897
BLAKE2b-256 ff1b34d3738f8e7323b6baeeb8323c3107ecb1e380a5c49cb25a99f89139712d

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