Skip to content

mengps/HuskarUI

Repository files navigation

ใ€Œ HuskarUI ใ€ Modern UI for Qml

Ant Design component library for Qt Qml

If you need Python impl HuskarUI for PySide6

If you need Qt5 impl HuskarUI for Qt5

win-badge linux-badge macos-badge android-badge

Issues Issues Release

QQGroup

English | ไธญๆ–‡

๐ŸŒˆ Gallery Preview

โœจ Features

  • ๐Ÿ“ฆ A set of high-quality Qml components out of the box.
  • ๐ŸŽจ Powerful theme customization system.
  • ๐Ÿ’ป Based on Qml, completely cross platform.
  • ๐Ÿ”ง Highly flexible delegate based component customization.
  • ๐Ÿค– AI-assisted development support.

๐Ÿ—บ๏ธ Roadmap

The development plan can be found here: Component Roadmap.

Anyone can discuss through issues, QQ groups, or WeChat groups, and ultimately meaningful components/functions will be added to the development plan.

๐Ÿค– AI Assisted Development

Note

HuskarUI provides the HuskarUI Expert skill, designed for AI coding tools like Cursor, Trae, and VS Code Copilot. It helps you:

  • Quickly lookup component documentation and properties
  • Generate compliant component code
  • Get scenario-based development examples

๐Ÿ‘‰ See AI Skill Guide for more details.

๐Ÿ”– Online Document

๐ŸŒ Online Wiki

๐Ÿ“บ Online Demo

๐Ÿ—‚๏ธ Precompiled package

Precompiled packages and binary libraries for two platforms, Windows / Linux, have been created.

Please visit Release to download.

๐Ÿ”จ How to Build

  • Clone
git clone --recursive https://github.com/mengps/HuskarUI.git
  • Build & Install
    • Windows - Visual Studio
    cd HuskarUI
    cmake -DCMAKE_PREFIX_PATH=<QT_DIR> -G "Visual Studio <version>" -B build -S . 
    cmake --build build --config Release --target ALL_BUILD INSTALL --parallel
    • All - Ninja
    cd HuskarUI
    cmake -DCMAKE_PREFIX_PATH=<QT_DIR> -G "Ninja" -B build -S . 
    cmake --build build --config Release --target all install --parallel

Important

By default, INSTALL_HUSKARUI_IN_DEFAULT_LOCATION=ON:

  • the headers will be install in the [QtDir]/[QtVersion]/[Kit]/include/HuskarUI directory.
  • the *.dll will be install in the [QtDir]/[QtVersion]/[Kit]/bin directory.
  • the *.lib/*.so/*.dylib will be install in the [QtDir]/[QtVersion]/[Kit]/lib directory.
  • the qmlplugin will be install in the [QtDir]/[QtVersion]/[Kit]/qml directory.

If you want to change the installation directory, please modify the INSTALL_HUSKARUI_IN_DEFAULT_LOCATION to OFF and set the HUSKARUI_INSTALL_DIRECTORY in the cmake.

cmake -DCMAKE_PREFIX_PATH=<QT_DIR> \
  -DINSTALL_HUSKARUI_IN_DEFAULT_LOCATION=OFF \
  -DHUSKARUI_INSTALL_DIRECTORY=<install_dir> \
  -G "Ninja" -B build -S .

The installation directory structure

โ”€โ”€<install_dir>
    โ”œโ”€include
    โ”‚   โ””โ”€HuskarUI/*.h
    โ”œโ”€bin
    โ”‚   *.dll
    โ”œโ”€lib
    โ”‚   *.lib/*.so/*.dylib
    โ”‚   โ””โ”€cmake/*.cmake
    โ””โ”€qml
        โ””โ”€HuskarUI/Basic
        โ””โ”€HuskarUI/Impl
  • Usage
    • Using cmake Add the following cmake command to your project CMakeLists.txt
      find_package(HuskarUI REQUIRED)
      target_link_libraries(<your_target> HuskarUI::Basic)
    • Directly using the library
      • Link the <install_dir>/lib.
      • Include the <install_dir>/include.
      • [Optional] Copy the <install_dir>/bin/HuskarUIBasic.[dll] to [QtDir]/[QtVersion]/[Kit]/bin.
      • [Optional] Copy the <install_dir>/lib/HuskarUIBasic.[so/dylib] to [QtDir]/[QtVersion]/[Kit]/bin.
      • Copy the <install_dir>/qml/HuskarUI to [QtDir]/[QtVersion]/[Kit]/qml.

๐Ÿ“ฆ Get started

  • Create QtQuick application QtVersion >= 6.7
  • Add the following code to your main.cpp
 int main(int argc, char *argv[])
 {
     ...
     /*! Set OpenGL, optional */
     QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
     QQuickWindow::setDefaultAlphaBuffer(true);
     ...
     QGuiApplication app(argc, argv);
     QQmlApplicationEngine engine;
     engine.singletonInstance<QJSValue>("HuskarUI.Basic", "HusApp");
     ...
 }
  • Add the following code to your .qml
 import HuskarUI.Basic
 HusWindow { 
   ...
 }

Alright, you can now enjoy using HuskarUI.

๐Ÿšฉ Reference

๐Ÿ’“ LICENSE

Use MIT LICENSE

๐ŸŒ‡ Environment

Windows 11 / Ubuntu 24.04.2, Qt Version >= 6.7

๐ŸŽ‰ Star History

Star History Chart

About

๐ŸŽ‰ Ant-d UI-Kit for Qml

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors