当前位置: 首页 > news >正文

阿里巴巴国际站买家入口小程序视频网站开发

阿里巴巴国际站买家入口,小程序视频网站开发,49619浏览器打开,新任上海市领导调整公示简介 QFluentWidgets 是一个基于 Qt 的 Fluent Designer 组件库#xff0c;内置超过 150 个开箱即用的 Fluent Designer 组件#xff0c;支持亮暗主题无缝切换和自定义主题色。搭配所见即所得的 Fluent Designer 软件#xff0c;只需拖拖拽拽#xff0c;不用编写一行 QSS内置超过 150 个开箱即用的 Fluent Designer 组件支持亮暗主题无缝切换和自定义主题色。搭配所见即所得的 Fluent Designer 软件只需拖拖拽拽不用编写一行 QSS就能快速搭建现代化软件界面。 官网地址https://qfluentwidgets.com/ 仓库地址https://github.com/zhiyiYo/PyQt-Fluent-Widgets 演示视频https://www.bilibili.com/video/BV1o94y1a7Yv 编译示例 以 Qt5 为例Qt6 也支持从 Qt5 分支下载示例代码将 libQFluentWidgets.dll、libFramlessHelperCore.dll 和 libFramelessHelperWidgets.dll 放在 lib 文件夹中QFluentWidgets 头文件放在 include 文件夹中项目结构如下图所示 接着在终端输入指令进行编译其中 -DCMAKE_PREFIX_PATH 用于设置本机 Qt5 SDK 的路径 cmake -B ./build -DCMAKE_BUILD_TYPERelease -DCMAKE_PREFIX_PATHD:/Qt/5.15.2/mingw81_64 -G MinGW Makefiles .cd build cmake --build . --config Release --target all --parallel编译完成后可以在 build/bin 目录下看到所有生成的 exe 示例文件 搭配 Fluent Designer 项目结构如下图所示 其中 LoginWindow.py.ui 是使用 Fluent Designer 拖拽 PyQt-Fluent-Widgets 组件生成的 ui 文件预览效果如下 ui 代码如下从 customwidgets 可以看到导入的组件来自 PyQt-Fluent-Widgets ?xml version1.0 encodingUTF-8? ui version4.0classForm/classwidget classQWidget nameForm省略代码/widgetcustomwidgetscustomwidgetclassLineEdit/classextendsQLineEdit/extendsheaderqfluentwidgets/header/customwidgetcustomwidgetclassCheckBox/classextendsQCheckBox/extendsheaderqfluentwidgets/header/customwidgetcustomwidgetclassPrimaryPushButton/classextendsQPushButton/extendsheaderqfluentwidgets/header/customwidgetcustomwidgetclassHyperlinkButton/classextendsQPushButton/extendsheaderqfluentwidgets/header/customwidgetcustomwidgetclassBodyLabel/classextendsQLabel/extendsheaderqfluentwidgets/header/customwidget/customwidgetsresourcesinclude locationlogin.qrc//resourcesconnections/ /ui将该 ui 文件拖拽到 Fluent Studio 软件的设计师界面中点击转换按钮即可得到 C 组件库使用的 ui 文件。 项目使用的 CMakeLists.txt 代码如下 set(DEMO_NAME LoginDemo) cmake_minimum_required(VERSION 3.5) project(${DEMO_NAME} VERSION 1.0)set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_CXX_STANDARD 17) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON)find_package(Qt5 COMPONENTS Widgets Multimedia REQUIRED)# ----------------------------------------------------------------------------- file(GLOB inc_files ${CMAKE_SOURCE_DIR}/*.h) file(GLOB src_files ${CMAKE_SOURCE_DIR}/*.cpp)qt5_wrap_ui(UI_FILES ${CMAKE_SOURCE_DIR}/ui/LoginWindow.ui)# add resource SET(RCC_FILES ${CMAKE_SOURCE_DIR}/login.qrc) qt5_add_resources(RCC_SOURCES ${RCC_FILES})# 设置 dll 文件夹 link_directories(${CMAKE_SOURCE_DIR}/lib)add_executable(${DEMO_NAME} ${src_files} ${inc_files} ${UI_FILES} ${RCC_SOURCES})target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Widgets QFluentWidgets FramelessHelperCore FramelessHelperWidgets)# 设置头文件搜索路径 target_include_directories(${PROJECT_NAME}PRIVATE${CMAKE_SOURCE_DIR}/include${CMAKE_SOURCE_DIR}/include/framelesshelper/include${CMAKE_SOURCE_DIR}/include/framelesshelper/src/core${CMAKE_SOURCE_DIR}/include/framelesshelper/src/widgets${CMAKE_SOURCE_DIR}/include/framelesshelper/qmake/inc/core )# 拷贝 dll 到 bin 目录 configure_file(${CMAKE_SOURCE_DIR}/lib/libFramelessHelperCore.dll ${CMAKE_SOURCE_DIR}/build/bin/libFramelessHelperCore.dll COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/lib/libFramelessHelperWidgets.dll ${CMAKE_SOURCE_DIR}/build/bin/libFramelessHelperWidgets.dll COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/lib/libQFluentWidgets.dll ${CMAKE_SOURCE_DIR}/build/bin/libQFluentWidgets.dll COPYONLY)main.cpp 代码如下可以看到这里通过 #include ui_LoginWindow.h 和 ui-setupUi(this) 来使用 Fluent 组件初始化界面 #include ui_LoginWindow.h #include FramelessHelper/Core/FramelessManager #include FramelessHelper/Widgets/FramelessWidgetsHelper #include FramelessHelper/Widgets/StandardSystemButton #include framelessconfig_p.h #include QApplication#include QFluentWidgets/Common/FluentApp.h #include QFluentWidgets/Common/Translator.h #include QFluentWidgets/Window/FluentWindow.husing namespace qfluentwidgets; FRAMELESSHELPER_USE_NAMESPACE using namespace Global;class Demo : public QWidget {Q_OBJECT public:Demo(QWidget *parent nullptr) : QWidget(parent), ui(new Ui::Form), titleBar(new SplitTitleBar(this)){// 启用无边框FramelessWidgetsHelper::get(this)-extendsContentIntoTitleBar();// 设置主题色setThemeColor(#28afe9);// 初始化 UIui-setupUi(this);setWindowIcon(QIcon(:/qfluentwidgets/images/logo.png));setWindowTitle(QFluentWidgets);resize(1000, 650);setStyleSheet(Demo{background: transparent});titleBar-titleLabel()-setStyleSheet(QLabel{ background: transparent; font: 13px Segoe UI; padding: 0 4px; color: white});// 隐藏系统标题栏的最大化和最小化按钮setWindowFlags(windowFlags() ~Qt::WindowMinMaxButtonsHint ~Qt::WindowCloseButtonHint);// 设置标题栏FramelessWidgetsHelper *helper FramelessWidgetsHelper::get(this);helper-setTitleBarWidget(titleBar);helper-setSystemButton(titleBar-minButton(), SystemButtonType::Minimize);helper-setSystemButton(titleBar-maxButton(), SystemButtonType::Maximize);helper-setSystemButton(titleBar-closeButton(), SystemButtonType::Close);titleBar-raise();}protected:void resizeEvent(QResizeEvent *e){QWidget::resizeEvent(e);titleBar-resize(width(), titleBar-height());}private:Ui::Form *ui;SplitTitleBar *titleBar; };int main(int argc, char *argv[]) {// enable dpi scale #if (QT_VERSION QT_VERSION_CHECK(5, 14, 0))QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endifQApplication::setAttribute(Qt::AA_EnableHighDpiScaling);QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);QApplication app(argc, argv);// 启用云母效果FramelessConfig::instance()-set(Option::EnableBlurBehindWindow);FramelessConfig::instance()-set(Option::DisableLazyInitializationForMicaMaterial);// 国际化ftranslator.load(QLocale());Demo w;w.show();return app.exec(); }#include main.moc编译指令不变双击 build/bin/LoginWindow.exe 就能看到效果 写在最后 C 组件库需要许可证才能拿到头文件和动态链接库使用如果想体验运行效果可以安装 Python 组件库并运行各个 demo.py或者下载编译好的 PyQt-Fluent-Widgets-Gallery最终效果和 C 是一样的。 经常有小伙伴留言为什么不将 C 组件库一起开源其实原因很简单白嫖的话有 Python 组件库就够了一个人的精力是有限的无法为爱发电维持这么多个组件库分支的开发以上~~
http://www.zqtcl.cn/news/681987/

相关文章:

  • 嘉兴品牌网站建设网站开发项目拖延周期
  • 网站版面布局结构网站建设公司公司
  • 给新公司建网站中国互联网企业排名前十名
  • 中国建设银行网站会员用户名网站建设应列入啥费用
  • 网站上面的水印怎么做的广东网站建设公
  • 爱站网关键词长尾挖掘工具wordpress文章外链
  • 做视频剪辑接私活的网站网站商城系统设计
  • thinkphp5做网站做网站需要准备资料
  • 门户网站平台建设方案建e室内设计网cad
  • 西安网站建设收费标准第五次全国经济普查
  • 成品网站货源1688免费襄阳公司网站建设
  • 2020国内十大小说网站排名365网站
  • 潍坊做网站的网络公司网页设计入门教材pdf
  • 影视公司网站建设wordpress 500ms
  • 旅游网站建设公司crm客户管理系统模板
  • 哪个网站有免费的模板阿里云上如何用iis做网站
  • 中山优化网站门户网站建设jz190
  • 湖州服装网站建设网站备案和域名备案区别
  • 网站开发好学嘛网络安全工程师年薪
  • 17网站一起做网店睡衣网线制作流程
  • 广告网站设计公司好吗网站页面设计主要包括
  • 网站的做重庆市建设工程造价信息表
  • 建网站跟建网店的区别怎样营销建设网站
  • 医院做网站的风格乐清网站建设哪家好
  • 手机商城网站方案如何自己搭建微信小程序
  • 做影视免费网站违法吗青岛快速排名优化
  • 网站建设在电子商务中的作用的看法360地图怎么添加商户
  • 网站域名备案与不备案的区别wordpress 注册审核
  • 大学生做企业网站网页设计免费模板情侣
  • 商城网站建设教程网站开发支付宝