Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mywidgets-0.1.1.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

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

mywidgets-0.1.1-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

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

Hashes for mywidgets-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ecb6835b43161e59729fad823eaf27be9fad9aec7093b3b0756d4d00cd36a9b2
MD5 799cae103a5a6d929f6509c4e2b844db
BLAKE2b-256 ed3d682ad9cae0009efc26f7875ca7aca37c06d327be427806c7c4aea2b3c466

See more details on using hashes here.

Provenance

The following attestation bundles were made for mywidgets-0.1.1.tar.gz:

Publisher: publish.yml on zhuangjinpo06/mywidgets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for mywidgets-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd22c3ddd8ddca175363ab1223f686ab45335b2147a7ce411106c1ec31db40e4
MD5 832cbc29fe6c22d61d554c20cb2ebbcf
BLAKE2b-256 cf5a2c6375ecc467bd96924a8d88a1ed2489eea0a8c6417a762ea96f0beb62ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for mywidgets-0.1.1-py3-none-any.whl:

Publisher: publish.yml on zhuangjinpo06/mywidgets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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