Fluent-style PySide6 widgets for desktop applications.
Project description
mywidgets
mywidgets 是一个基于 PySide6 的 Fluent 风格桌面组件库,提供亮色/暗色/跟随系统主题、动态图标、导航、输入、数据展示、反馈弹层、设置卡片和日期时间控件。
公开组件统一从 mywidgets 根包导入。
安装
python -m pip install mywidgets
从源码开发:
git clone https://github.com/zhuangjinpo06/mywidgets.git
cd mywidgets
python -m pip install -e ".[dev]"
快速开始
import sys
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
from mywidgets import BodyText, ModernWindow, PrimaryButton, ThemeMode, apply_theme
class HomePage(QWidget):
def __init__(self):
super().__init__()
layout = QVBoxLayout(self)
layout.addWidget(BodyText("mywidgets 已就绪"))
layout.addWidget(PrimaryButton("运行", "play"))
layout.addStretch(1)
app = QApplication(sys.argv)
apply_theme(app, ThemeMode.LIGHT, "#3f8cff")
window = ModernWindow("示例应用", "MY APP")
window.add_page(HomePage(), "首页", "home", route_key="home")
window.resize(1100, 720)
window.show()
sys.exit(app.exec())
Gallery
Gallery 覆盖基础控件、表单、日期时间、数据视图、导航、弹层和设置组件:
python examples/gallery.py
python examples/gallery.py --dark
python examples/gallery.py --accent "#00a389"
开发与验证
python -m unittest discover -s tests -v
python -m compileall -q mywidgets examples tests
python -m build
python -m twine check dist/*
更完整的接入说明见 mywidgets/USAGE.md。
项目结构
mywidgets/:可发布的组件库。examples/gallery.py:可交互的完整组件 Gallery。tests/:离屏 Qt 自动化测试。.github/workflows/:持续集成与 PyPI Trusted Publishing 工作流。
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 mywidgets-0.1.1.tar.gz.
File metadata
- Download URL: mywidgets-0.1.1.tar.gz
- Upload date:
- Size: 37.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 |
ecb6835b43161e59729fad823eaf27be9fad9aec7093b3b0756d4d00cd36a9b2
|
|
| MD5 |
799cae103a5a6d929f6509c4e2b844db
|
|
| BLAKE2b-256 |
ed3d682ad9cae0009efc26f7875ca7aca37c06d327be427806c7c4aea2b3c466
|
Provenance
The following attestation bundles were made for mywidgets-0.1.1.tar.gz:
Publisher:
publish.yml on zhuangjinpo06/mywidgets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mywidgets-0.1.1.tar.gz -
Subject digest:
ecb6835b43161e59729fad823eaf27be9fad9aec7093b3b0756d4d00cd36a9b2 - Sigstore transparency entry: 2136718543
- Sigstore integration time:
-
Permalink:
zhuangjinpo06/mywidgets@53d801d038f819fb2789db47591cb450106517df -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/zhuangjinpo06
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@53d801d038f819fb2789db47591cb450106517df -
Trigger Event:
push
-
Statement type:
File details
Details for the file mywidgets-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mywidgets-0.1.1-py3-none-any.whl
- Upload date:
- Size: 44.4 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 |
cd22c3ddd8ddca175363ab1223f686ab45335b2147a7ce411106c1ec31db40e4
|
|
| MD5 |
832cbc29fe6c22d61d554c20cb2ebbcf
|
|
| BLAKE2b-256 |
cf5a2c6375ecc467bd96924a8d88a1ed2489eea0a8c6417a762ea96f0beb62ff
|
Provenance
The following attestation bundles were made for mywidgets-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on zhuangjinpo06/mywidgets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mywidgets-0.1.1-py3-none-any.whl -
Subject digest:
cd22c3ddd8ddca175363ab1223f686ab45335b2147a7ce411106c1ec31db40e4 - Sigstore transparency entry: 2136718545
- Sigstore integration time:
-
Permalink:
zhuangjinpo06/mywidgets@53d801d038f819fb2789db47591cb450106517df -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/zhuangjinpo06
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@53d801d038f819fb2789db47591cb450106517df -
Trigger Event:
push
-
Statement type: