FluentPy for Qt
Fluent 风格的 Qt for Python 桌面组件库,由性邓的小馒头独立开发,采用 MIT 许可证。
安装
需要 Python 3.10+。建议在新建的虚拟环境内安装:
python -m venv .venv
# Windows
.venv\Scripts\python -m pip install fluentpy-qt
# macOS / Linux
.venv/bin/python -m pip install fluentpy-qt
PyPI 安装名是 fluentpy-qt,代码导入名仍为 fluentpy。
PyPI 上的 fluentpy 是其他作者的独立项目,请勿用 pip install fluentpy 安装本组件库。
两个项目的导入名称冲突,应放在不同的虚拟环境中使用。
PySide6 会作为依赖安装。Qt、PySide6 等依赖遵循各自的许可证。
第一个窗口
import sys
from fluentpy import AccentButton, FluentWindow
from fluentpy.qt import QtWidgets
app = QtWidgets.QApplication(sys.argv)
window = FluentWindow("你好,FluentPy")
window.resize(800, 560)
window.set_title_bar_enabled(True)
button = AccentButton("你好,世界")
window.content_layout.addWidget(button)
window.show()
sys.exit(app.exec())
组件
- 按钮、输入、前后缀输入、分格密码、复选框和各类下拉选择。
- 表格、滑块、日期时间滚轮、日历、颜色编辑器和取色。
- 卡片、可展开容器、导航、流畅窗口、启动页面及主题渐变。
- 高级右键菜单、消息条、吐司、进度提示和对话框。
- 拖放、快捷键录制、代码编辑器和音符时间轴。
0.7.2 起,SplitButton / AccentSplitButton 可同时显示动作文字和自定义说明:
from fluentpy import AccentSplitButton, ActionMenu
launch = AccentSplitButton("启动游戏", window, description="1.0 · 正式版")
versions = ActionMenu(window)
versions.add_action("1.1 · 预览版", callback=lambda: launch.set_description("1.1 · 预览版"))
launch.set_menu(versions)
launch.clicked.connect(lambda: print("启动:", launch.description()))
主区域执行操作,箭头独立展开菜单;选择选项仅更新说明。两行内容自动增高,支持主题、鼠标和键盘反馈;不传 description 时保持原有单行用法。
工作台和独立示例在源码仓库的 examples/ 中,可从源码运行 python examples/showcase.py。
wheel 安装的是组件库,不包含示例工作台。
可选 C 加速
Qt 负责界面和动画;C 扩展加速文本、日期、时间、日历、拖放、快捷键、颜色和输入策略。 默认优先使用 C,扩展缺失或不兼容时自动回退 Python,基本运行无需 C 编译器。
当前提供 Windows x64 / CPython 3.13 的原生 wheel,以及不含本机二进制的通用 Python wheel。
其他 Python 版本和平台使用通用 wheel,运行兼容后端;也可从源码编译对应扩展。
FLUENTPY_BACKEND=python 可强制回退,native 要求对应 C 接口可用。
当前实际验证环境为 Windows x64、CPython 3.13、PySide6 / Qt 6.11.1。 其他平台的桌面表现需另行验证。Windows 11 云母效果在系统不支持时回退普通背景。
项目处于早期开发阶段。组件接口、用法及 C 构建说明见官方文档。
来源与许可
FluentPy 独立实现组件,仅参考公开的 Fluent 设计与交互思路,不包含参考组件库的源码、样式或示例素材。 Microsoft Fluent UI System Icons 的 MIT 许可与来源声明随包提供。 详情见第三方声明。
Metadata
Release files for fluentpy-qt 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fluentpy_qt-0.7.2.tar.gz | 1.8 MB | Without provenance | Details for fluentpy_qt-0.7.2.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fluentpy_qt-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for fluentpy_qt-0.7.2-py3-none-any.whl |
| fluentpy_qt-0.7.2-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for fluentpy_qt-0.7.2-cp313-cp313-win_amd64.whl |
Total release size: 2.4 MB
Release files / fluentpy_qt-0.7.2.tar.gz
| Download URL | fluentpy_qt-0.7.2.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08fa9e046c2cf5423cee1239b504a0668efd41da3a34adbae5c4116e7f8c9f18
|
|
BLAKE2b-256 checksum How to use checksums |
4ef28fcadaa11ccf5e2554b361d48918894d7e814dca9295fe38916c199dc777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.1
|
Release files / fluentpy_qt-0.7.2-py3-none-any.whl
| Download URL | fluentpy_qt-0.7.2-py3-none-any.whl |
|---|---|
| Size | 295.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8b8a2290f17fa252926d51e99cbcda917e81a5882a209c6d94a9984eeafdf61
|
|
BLAKE2b-256 checksum How to use checksums |
145c77daad199899b5e7e88a05df8b132452aae8c15e285a424570d5d540b266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.1
|
Release files / fluentpy_qt-0.7.2-cp313-cp313-win_amd64.whl
| Download URL | fluentpy_qt-0.7.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 397.0 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b146e757530e6d137a19800186ac07a4fb28b85d1d35cd34eb159983e0ca852e
|
|
BLAKE2b-256 checksum How to use checksums |
d20a544d25827f84a21afed456616618f97bfd84aca86012e14d8ac3f42ac5f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.1
|
Security for fluentpy-qt 0.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.