Giter Site home page Giter Site logo

wang-2598 / qt-widget-fancy_ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from colorref/qwidget-fancyui

1.0 0.0 0.0 30.39 MB

花里胡哨的Qt UI,支持c++和PySide6,使用Qt Widgets,使用Qt6。The fancy UI-Qt widget UI controls are built in c++ and PySide6 and are tailored for Qt widgets. Use the Qt6 version.

License: GNU General Public License v3.0

C++ 91.63% Python 4.42% C 0.15% QMake 3.80%

qt-widget-fancy_ui's Introduction

FancyUi - Qt Widget

简体中文 | English

控件目录

  • 按钮
    • 悬浮填充按钮 • HoverFillButton
  • 单行文本框
    • 动态下划线单行文本框 • DynamicUnderlineLineEdit
  • 其余控件整理中......

封装和重构了:云母效果窗口、云母Alt效果窗口、Areo效果窗口、修改标题栏颜色的方法、修改标题栏文字颜色的方法以及修改深浅主题的方法,添加了亚克力效果窗口。详见:windowEffect文件夹
相关文档整理中

按钮

悬浮填充按钮 - HoverFillButton

GIF示例

构造函数和枚举类

枚举类:

  • AnimationType

    作用域:HoverFillButtonBaseHoverFillButton

    enum class AnimationType
    {
        CircularFill,      // 进入点圆形填充
        CrossFill,         // 左右两个小圆交叉填充
        DiagonalRectangle, // 斜着的矩形填充
        BottomCircle,      // 底部圆形填充
        LeftRectangle      // 左侧矩形填充
    };

构造函数:

  • QPushButton类,但额外添加参数:AnimationType枚举,用于控制动画类型,默认动画类型为AnimationType::CircularFill
  • 在designer中通过拖拽或“提升为”使用时,可以通过void setAnimationType设置动画类型

成员函数说明

成员函数 功能说明 参数 参数说明
void addShadow 为按钮添加阴影效果 int 阴影右偏移量
int 阴影下偏移量
void setTextColor 设置按钮文字默认颜色和悬浮时颜色 const QColor& 默认文字颜色
const QColor& 悬浮时文字颜色
QPalette &palette 返回按钮对象的QPalette的非const引用
void refreshRadius 使用样式表修改按钮的圆角半径后,需调用此函数更新圆角半径 int 对应样式表中的圆角半径值
void setFillSpeed 控制填充速度 int 越小填充越快,最小值为1
void setFillBrush 设置填充内容绘制笔刷 const QBrush & 自定义的笔刷样式
void setAnimationType 设置动画类型,预提供了5种动画 AnimationType枚举类 动画类型枚举

单行文本框

动态下划线单行文本框 - DynamicUnderlineLineEdit

GIF示例

构造函数

  • QLineEdit

成员函数说明

成员函数 功能说明 参数 参数说明
void setLinePen 设置线条的绘制画笔 const QPen& 获取焦点时的绘制画笔
const QPen& 失去焦点时的绘制画笔
void setTextColor 设置输入文字颜色 const QColor& 输入文字的颜色
void setPlaceholderTextColor 设置预设背景文字颜色 const QColor & 背景提示文字颜色
void setLineSpeed 设置线条填填充速度 int 越小填充越快,最小为1

其余控件编写中......

qt-widget-fancy_ui's People

Contributors

colorref avatar

Stargazers

Jerrod Schehr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.