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

搜狗提交网站入口自己做的网站加载慢的原因

搜狗提交网站入口,自己做的网站加载慢的原因,抖音seo搜索优化,颍上县城乡住房建设局网站简介 QFluentWidgets 是一个基于 Qt 的 Fluent Designer 组件库#xff0c;内置超过 150 个开箱即用的 Fluent Designer 组件#xff0c;支持亮暗主题无缝切换和自定义主题色。 编译示例 以 Qt5 为例#xff08;Qt6 也支持#xff09;#xff0c;将 libQFluentWidgets.d…简介 QFluentWidgets 是一个基于 Qt 的 Fluent Designer 组件库内置超过 150 个开箱即用的 Fluent Designer 组件支持亮暗主题无缝切换和自定义主题色。 编译示例 以 Qt5 为例Qt6 也支持将 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 代码如下从 可以看到导入的组件来自 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 C M A K E S O U R C E D I R / b u i l d / b i n / l i b F r a m e l e s s H e l p e r C o r e . d l l C O P Y O N L Y ) c o n f i g u r e f i l e ( {CMAKE_SOURCE_DIR}/build/bin/libFramelessHelperCore.dll COPYONLY) configure_file( CMAKES​OURCED​IR/build/bin/libFramelessHelperCore.dllCOPYONLY)configuref​ile({CMAKE_SOURCE_DIR}/lib/libFramelessHelperWidgets.dll C M A K E S O U R C E D I R / b u i l d / b i n / l i b F r a m e l e s s H e l p e r W i d g e t s . d l l C O P Y O N L Y ) c o n f i g u r e f i l e ( {CMAKE_SOURCE_DIR}/build/bin/libFramelessHelperWidgets.dll COPYONLY) configure_file( CMAKES​OURCED​IR/build/bin/libFramelessHelperWidgets.dllCOPYONLY)configuref​ile({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 是一样的。
http://www.hkea.cn/news/14406129/

相关文章:

  • 住房城乡建设部执业资格注册中心网站备案 个人网站
  • 做现金贷网站的公司彩钢做网站能赚钱吗
  • 建网站怎么年赚贾汪区住房和城乡建设局网站
  • 做网站用笔记本做服务器吗在萍乡谁可以做网站
  • iis新建网站不能访问绿色科技网站建设
  • 宁波网站seo花店网站建设课程设计
  • 自己怎么1做网站河南省住房和建设厅网站首页
  • 织梦添加网站音乐网站支付方案的设计
  • 外贸电商网站模板一个app能卖多少钱
  • 坪山企业网站建设免费高清网站在线观看
  • 石家庄住建局网站ps切片做网站
  • 泰州网站建设外包公司网站开发需要多少钱
  • dw网站怎么做背景图wordpress 数据
  • 长春给企业做网站的公司怎样编写app软件
  • 龙岗在线网站制作app开发多少钱
  • 香橼做空机构网站wordpress shopy主题
  • 网站怎么写网络推广费用多少
  • 网站建设运维自查问题清单国内做钢铁的网站
  • 汕头有哪些需要建网站的公司医院网站建设的要求
  • 做展示型企业网站做软件赚钱的网站
  • 食品餐饮网站建设襄阳网站制作
  • 如何建设网站首页个人开网站
  • 沈阳网站公司排名网站建设p
  • 网址关键词查询网站洛阳网站设计开发
  • 微网站幻灯片尺寸会计培训班
  • 博罗营销网站制作全自动在线网页制作
  • 网站开发 .net 开源网站图片怎样做seo优化
  • 贵州省建设厅报名网站网站首页轮播图怎么做的
  • 如何做一名网站编辑商标设计找哪里
  • 凤城网站建设抖音代运营合作协议书范本