Skip to main content

Fluent-style PySide6 widgets for desktop applications.

Project description

mywidgets

mywidgets 是一个基于 PySide6 的 Fluent 风格桌面组件库,提供亮色/暗色/跟随系统主题、动态图标、导航、输入、数据展示、反馈弹层、设置卡片和日期时间控件。

组件库不依赖 qfluentwidgets,公开组件统一从 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.0.tar.gz (36.7 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.0-py3-none-any.whl (43.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mywidgets-0.1.0.tar.gz
  • Upload date:
  • Size: 36.7 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.0.tar.gz
Algorithm Hash digest
SHA256 9ab8612b3dcdc6dba00c705b5616a8000f1896a50ab5ed4ed047f49f529ae119
MD5 2b085ca7f6ffa2ec239e202f49363a71
BLAKE2b-256 5b2f090e2e6cc3bb4ab5ddaa4258d18994757adcb3ab462537914e2d627d3f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for mywidgets-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: mywidgets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd698ed97166b83f46665569bd49de52dae38dbb057dbf1ac30898e1c74205c2
MD5 75870fc256e99430368d7183e83010cc
BLAKE2b-256 ebbffd1141e0740e4460d4326d58e59f9f9f18a35821d69d8dd0700ebc5ac5e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mywidgets-0.1.0-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