calvinhxx/Fluent-Qt
حول
MIT-licensed native Fluent UI for Qt Widgets (C++17, PySide6 & WebAssembly) — 101 Gallery entries, DataGrid, charts, Page Studio & Qt Designer
البيانات والتحليلاتالنمو المقاس للنجوم
- خلال 24 ساعة
- +٣
- خلال 7 أيام
- +١٣
- خلال 15 يومًا
- +٢٦
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلEnglish | 简体中文 | 繁體中文 | 日本語 | 한국어 | Deutsch | Русский | Español | Français
Fluent-Qt
MIT-licensed native Fluent UI component library for Qt Widgets — one C++17 implementation for C++, PySide6, and WebAssembly.
Try the live C++ Web Gallery · Page Studio · Property preview · Docs & API · Project website · Questions & community · Support the project
Fluent-Qt (FluentQt) brings Fluent UI to Qt Widgets across C++17, PySide6, and WebAssembly from one native codebase:
- MIT-licensed for commercial and open-source apps — the C++17 library, PySide6 bindings, Qt Designer plugin, and application starters all use the MIT license.
- One native C++17 implementation — Gallery entries including editable
DataGrid,DiffView,FlexLayout, charts, navigation, overlays, dialogs, and windows run the same C++17 widgets in C++ (Qt 5.15+/6.2+),PySide6, andWebAssembly, rather than stylesheet-only skins. - Visual design and shared
.uiforms — Build pages in browser-based Page Studio, or use the widget palette and form templates in Qt Creator andpyside6-designer. - Application starters and AI GUI skill — scaffold layered
monitor,workbench, andexisting-qtapps viapython3 tools/onboarding/fluentqt, or build interfaces withbuild-fluentqt-gui. - Opt-in extension modules — core apps depend only on
Qt Widgets; enable CPU particle backgrounds (Particles), 3D perspective views (Spatial), or embedded QML pages (QmlBridge) only when needed.
🧩 Library modules
| Module | CMake target | Purpose |
|---|---|---|
| Core | FluentQt::FluentQt |
All 2D controls, themes, typography, layout helpers, and charts. Ordinary 2D apps only need this target. |
| Plugins | FluentQt::Plugins |
In-process plugin registration, dependency ordering, activation, and cleanup. |
| Particles | FluentQt::Particles |
CPU-rendered animated particle backgrounds (ParticleBackdrop, no OpenGL required) and ParticlesSession pause/resume. |
| Spatial | FluentQt::Spatial |
Adds perspective to existing QWidget layouts. If session activation or view creation fails, the app provides a 2D layout. |
| QmlBridge | FluentQt::QmlBridge |
QmlView for embedding QML pages in Widgets while sharing app models and Fluent themes. |
C++ apps link these targets directly, Python apps use the matching PySide6 modules, and WebAssembly compiles the same C++ code for the browser. Try the extension samples in Gallery under Plugins → Particles, Plugins → Spatial (enable Settings → 3D Gallery), and Plugins → QmlBridge → QmlView, or see the minimal QML example.
🖼 Gallery & Online Docs
Use Gallery to browse controls, try interactions, and read C++ and Python example code.
| Try it on | Entry point |
|---|---|
| Browser (WebAssembly Gallery) | Live Gallery · Project website |
| Online docs & Property preview | Component docs & API · Try Property preview |
| Windows, macOS, Linux | Download a Gallery package |
Component docs & Property preview
The online documentation includes setup guides, component API references, and release notes. Open Property preview on any component page to adjust live Qt properties and copy the generated C++ or PySide6 code:
Quick try: Button · CheckBox · ComboBox · DataGrid · FlexLayout · DiffView · LineChart · ParticleBackdrop · SpatialView · QmlView
Python Gallery
Install the Python Gallery from PyPI (it pulls in the matching FluentQt version automatically):
python -m pip install FluentQt-Gallery
python -m fluentqt_gallery
🎨 Visual design
Start from a template or an AI-assisted layout in Page Studio. Edit several controls at once, rotate the 3D view to inspect their hierarchy, and preview interactions. Export the page as C++, PySide6, or a Qt Designer .ui form. In C++ and PySide6 exports, connect the trigger button to open overlays such as Flyout.
Qt Designer
Qt Creator and pyside6-designer share the same Widget Box entries and form templates. Available controls depend on the installed modules. Designer setup.
🤖 Build with AI
AI Skill & Onboarding CLI: Use the build-fluentqt-gui skill in Codex, Claude Code, or Cursor (Example · Install and use), and run python3 tools/onboarding/fluentqt (Onboarding tools) to check environments and scaffold layered C++ or PySide6 apps (monitor, workbench, or existing-qt). When tuning Gallery samples, preview saved edits in Live Scene before verifying the compiled C++ sample (How it works).
python3 tools/onboarding/fluentqt create my-monitor --language cpp --starter monitor
python3 tools/onboarding/fluentqt create my-py-monitor --language pyside6 --starter monitor
🚀 Quick Start
Fluent-Qt runs natively in both Python (PySide6) and C++17 (CMake).
Python (PySide6)
The Qt/PySide6 6.9.3 wheels support CPython 3.11–3.13. Linux ARM64 requires CPython 3.12–3.13 and glibc 2.39+.
python -m pip install FluentQt
main.py:
import sys
import fluentqt
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
from fluentqt.basicinput import Button
from fluentqt.windowing import Window
fluentqt.prepare_high_dpi_application()
app = QApplication(sys.argv)
fluentqt.initialize_resources()
app.setFont(fluentqt.font_for_role(fluentqt.FontRole.Body))
window = Window()
window.resize(480, 320)
content = QWidget()
button = Button("Hello from FluentQt", content)
button.setFluentStyle(Button.ButtonStyle.Accent)
QVBoxLayout(content).addWidget(button, alignment=Qt.AlignmentFlag.AlignCenter)
window.setContentWidget(content)
window.show()
sys.exit(app.exec())
C++ setup
The C++ integration requires C++17, CMake 3.16+, and Qt Widgets 5.15+ or 6.2+. Use FetchContent for new projects.
FetchContent integration
cmake_minimum_required(VERSION 3.16)
project(my_app LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
fluentqt
GIT_REPOSITORY https://github.com/calvinhxx/Fluent-Qt.git
GIT_TAG v1.13.0
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(fluentqt)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE FluentQt::FluentQt)
vcpkg
For Qt 6 applications, install the core static Widgets library (1.12.4+) directly from the official vcpkg registry:
vcpkg install fluent-qt
Or add "fluent-qt" to vcpkg.json, configure with the vcpkg toolchain, and link FluentQt::FluentQt via find_package(FluentQt CONFIG REQUIRED). See the vcpkg setup guide for manifest feature selection and platform prerequisites.
Source integration
After defining your application target, add the Fluent-Qt source directory and link the exported target:
add_subdirectory(Fluent-Qt)
target_link_libraries(my_app PRIVATE FluentQt::FluentQt)
Installed library integration
Use a FluentQt installation that includes the development headers and CMake package files. See the library build and installation guide.
find_package(FluentQt CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE FluentQt::FluentQt)
If FluentQt is outside the system search path, configure with -DCMAKE_PREFIX_PATH=/path/to/fluentqt.
Conan 2 users can build the Widgets library in their local cache.
C++ minimal example
main.cpp:
#include <FluentQt/FluentQt.h>
#include <QApplication>
#include <QVBoxLayout>
#include <QWidget>
int main(int argc, char* argv[])
{
fluent::prepareHighDpiApplication();
QApplication app(argc, argv);
fluent::initializeResources();
app.setFont(Typography::fontStyle(Typography::FontRole::Body).toQFont());
fluent::windowing::Window window;
window.setWindowTitle(QStringLiteral("FluentQt Hello World"));
window.resize(480, 320);
auto* content = new QWidget;
auto* layout = new QVBoxLayout(content);
layout->setContentsMargins(32, 32, 32, 32);
auto* button = new fluent::basicinput::Button(
QStringLiteral("Hello from FluentQt"), content);
button->setFluentStyle(fluent::basicinput::Button::Accent);
layout->addStretch();
layout->addWidget(button, 0, Qt::AlignCenter);
layout->addStretch();
window.setContentWidget(content);
window.show();
return app.exec();
}
See examples/hello_world for the complete project, or run the fluentqt_hello_world target directly from an IDE.
🛠 Build
Dependencies
| Scope | Dependencies |
|---|---|
| FluentQt C++ library | C++17, CMake 3.16+, Qt Widgets 5.15+ or 6.2+ |
| C++ Gallery | FluentQt, Qt Network, spdlog/fmt |
| C++ WebAssembly | Qt 6.9.3 wasm_singlethread, Emscripten 3.1.70 |
| Tests | FluentQt, Qt Test/Network, GTest, spdlog/fmt |
| Optional PySide6 bindings | Qt/PySide6/Shiboken6 6.2.4+; Python 3.10+ for source builds |
Library
cmake -S . -B build/fluentqt \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/path/to/Qt
python3 tools/dev/fluent_qt_build.py build/fluentqt --config Release --target FluentQt
cmake --install build/fluentqt --config Release \
--component Development --prefix /path/to/install
The build script selects parallelism from available CPU and memory. See the build workflow for configuration.
Optional extensions
Enable the Plugins module or a specific extension when configuring FluentQt, then link its CMake target in your app:
| Extension scope | Build option | CMake target | Integration example |
|---|---|---|---|
| Plugins core | -DFLUENT_QT_BUILD_PLUGINS=ON |
FluentQt::Plugins |
Minimal plugin example |
| Plugins → Particles | -DFLUENT_QT_BUILD_PARTICLES=ON |
FluentQt::Particles |
Particles integration |
| Plugins → Spatial | -DFLUENT_QT_BUILD_SPATIAL=ON |
FluentQt::Spatial (automatically includes Plugins) |
Spatial Hello World |
| Plugins → QmlBridge | -DFLUENT_QT_BUILD_QML_BRIDGE=ON |
FluentQt::QmlBridge (automatically includes Plugins) |
QML host example |
When building from source, set these options before add_subdirectory() or FetchContent_MakeAvailable(). Matching Python builds expose enabled modules as fluentqt.plugins, fluentqt.spatial, and fluentqt.qmlbridge, and WebAssembly compiles the shared C++ implementation.
Build Gallery locally
Repository presets require CMake 3.25+ and VCPKG_ROOT. Configure your Qt kit
using the first-use setup.
List the presets available on the current host:
cmake --list-presets
On Apple Silicon, use vcpkg-osx:
cmake --preset vcpkg-osx
python3 tools/dev/fluent_qt_build.py \
--preset vcpkg-osx \
--target fluent_qt_gallery
Use the matching preset on other platforms:
| Platform | Preset |
|---|---|
| Apple Silicon Mac | vcpkg-osx |
| Intel Mac or Rosetta | vcpkg-osx-x64 |
| Linux x64 | vcpkg-linux |
| Linux ARM64 | vcpkg-linux-arm64 |
| Windows x64 | vcpkg-windows |
| Windows ARM64 | vcpkg-windows-arm64 |
For packaging, use the matching -release preset and the verification
steps in the packaging workflow.
WebAssembly
See the WebAssembly workflow for the browser toolchain, local builds, validation, and Pages deployment.
Source package
Create the reduced library source package for offline or source integration:
python3 tools/dev/fluent_qt_build.py build/fluentqt --target fluent_qt_source_package
📚 Documentation
Start with the documentation map, or jump straight to what you need:
| Goal | Entry point |
|---|---|
| Browse controls & API | Component docs & API · WebAssembly Gallery |
| Build an app | Qt Designer · AI-assisted development · Onboarding tools |
| Contribute to FluentQt | Development guides · Architecture · Fluent design |
| Package or release | Packaging · Release governance · Release notes |
| Get help or report bugs | Community · Support · Security |
| Chat with the community | Fluent-Qt QQ group 1109997685 |
Use the QQ group to ask questions, share what you’re building, or work together. For questions or suggestions that need follow-up, use GitHub Discussions or Issues.
Before opening a pull request, read Contributing and the Code of Conduct.
🔗 References
| Source | Purpose |
|---|---|
| Windows UI Kit (Community) | Fluent / Windows visual reference |
| WinUI Gallery | Control behavior and sample page reference |
License
Fluent-Qt's own source code is released under the MIT License. Bundled assets and packaged runtime dependencies retain their upstream licenses; versions, provenance, source availability, and license details are listed in THIRD_PARTY_NOTICES.md. Trademarks and third-party design references are covered in TRADEMARKS.md.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…
