Qt/Qt Creator窗体界面集成自定义MyRibbon工具栏Qt纯代码实现-升级版2-非第三方Ribbon工具

程序示例精选
Qt/Qt Creator窗体界面集成自定义MyRibbon工具栏Qt纯代码实现-升级版2-非第三方Ribbon工具
如需安装运行环境或远程调试,见文章底部个人QQ名片,由专业技术人员远程协助!

前言

这篇博客针对《Qt/Qt Creator窗体界面集成自定义MyRibbon工具栏Qt纯代码实现-升级版2-非第三方Ribbon工具》编写代码,代码整洁,规则,易读。 学习与应用推荐首选。


运行结果


文章目录

一、所需工具软件
二、使用步骤
       1. 主要代码
       2. 运行结果
三、在线协助

一、所需工具软件

       1. VS2019, Qt
       2. C++

二、使用步骤

代码如下(示例):

#include "MainWindow.h"
#include "iconhelper.h"
#include<QImage>
#include<QPixmap>

MainWindow::MainWindow(QWidget *parent)
	: QMainWindow(parent)
{
	ui.setupUi(this);
	this->InitTitleBarStyle();
}

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWindowClass</class>
 <widget class="QMainWindow" name="MainWindowClass">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>739</width>
    <height>633</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>MainWindow</string>
  </property>
  <widget class="QWidget" name="centralWidget">
   <layout class="QGridLayout" name="gridLayout_3">
    <item row="2" column="0">
     <widget class="QFrame" name="frame_4">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
        <horstretch>0</horstretch>
        <verstretch>1</verstretch>
       </sizepolicy>
      </property>
      <property name="frameShape">
       <enum>QFrame::Box</enum>
      </property>
      <property name="frameShadow">
       <enum>QFrame::Raised</enum>
      </property>
      <layout class="QGridLayout" name="gridLayout_5">
       <property name="leftMargin">
        <number>0</number>
       </property>
       <property name="topMargin">
        <number>0</number>
       </property>
       <property name="rightMargin">
        <number>0</number>
       </property>
       <property name="bottomMargin">
        <number>0</number>
       </property>
       <property name="spacing">
        <number>0</number>
       </property>
       <item row="0" column="0">
        <layout class="QHBoxLayout" name="horizontalLayout_3">
         <property name="spacing">
          <number>0</number>
         </property>
         <item>
          <widget class="QPushButton" name="pushButton">
           <property name="minimumSize">
            <size>
             <width>50</width>
             <height>0</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>微软雅黑</family>
             <pointsize>12</pointsize>
            </font>
           </property>
           <property name="text">
            <string>开始</string>
           </property>
           <property name="iconSize">
            <size>
             <width>20</width>
             <height>20</height>
            </size>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QPushButton" name="pushButton_2">
           <property name="minimumSize">
            <size>
             <width>50</width>
             <height>0</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>微软雅黑</family>
             <pointsize>12</pointsize>
            </font>
           </property>
           <property name="text">
            <string>编辑</string>
           </property>
           <property name="iconSize">
            <size>
             <width>20</width>
             <height>20</height>
            </size>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QPushButton" name="pushButton_9">
           <property name="minimumSize">
            <size>
             <width>50</width>
             <height>0</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>微软雅黑</family>
             <pointsize>12</pointsize>
            </font>
           </property>
           <property name="text">
            <string>视图</string>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QPushButton" name="pushButton_24">
           <property name="minimumSize">
            <size>
             <width>50</width>
             <height>0</height>
            </size>
           </property>
           <property name="font">
            <font>
             <family>微软雅黑</family>
             <pointsize>12</pointsize>
            </font>
</ui>




运行结果

三、在线协助:

如需安装运行环境或远程调试,见文章底部个人 QQ 名片,由专业技术人员远程协助!

1)远程安装运行环境,代码调试
2)Visual Studio, Qt, C++, Python编程语言入门指导
3)界面美化
4)软件制作
5)云服务器申请
6)网站制作

当前文章连接:https://blog.csdn.net/alicema1111/article/details/132666851
个人博客主页:https://blog.csdn.net/alicema1111?type=blog
博主所有文章点这里:https://blog.csdn.net/alicema1111?type=blog

博主推荐:
Python人脸识别考勤打卡系统:
https://blog.csdn.net/alicema1111/article/details/133434445
Python果树水果识别:https://blog.csdn.net/alicema1111/article/details/130862842
Python+Yolov8+Deepsort入口人流量统计:https://blog.csdn.net/alicema1111/article/details/130454430
Python+Qt人脸识别门禁管理系统:https://blog.csdn.net/alicema1111/article/details/130353433
Python+Qt指纹录入识别考勤系统:https://blog.csdn.net/alicema1111/article/details/129338432
Python Yolov5火焰烟雾识别源码分享:https://blog.csdn.net/alicema1111/article/details/128420453
Python+Yolov8路面桥梁墙体裂缝识别:https://blog.csdn.net/alicema1111/article/details/133434445

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/344505.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

github配置ssh的时候 ssh: connect to host github.com port 22: Connection timed out

今天配置ssh的时候最后一步验证是否能够连接成功的时候&#xff0c;出现了这个报错 查看了一下 .ssh 文件夹&#xff0c;发现只有两个文件 但是看到网上别人的都是有一个config文件&#xff0c;所以我们也要创建一个config文件&#xff08;这个文件是没有文件类型的&#xff0…

大模型-提示词工程

提示原则 1.编写明确具体的指令 策略一&#xff1a;使用分隔符清晰地表示输入的不同部分&#xff0c;分隔符可以是&#xff1a;&#xff0c;“”&#xff0c;<>&#xff0c; 你可以使用任何明显的标点符号将特定的文本部分与提示的其余部分分开。这可以是任何可以使模型…

Navicat 技术干货 | 保护关系数据库安全的措施

在当今的数字信息时代&#xff0c;数据是组织的生命线。因此&#xff0c;保护数据安全从未如此重要。为了防止敏感数据受到未经授权的访问、泄露或其他的安全威胁&#xff0c;实施强有力的安全措施非常有必要。本文将为大家列举一些保护关系数据库安全的措施建议。 访问控制 数…

微信小程序(十三)生命周期-更新应用提醒

注释很详细&#xff0c;直接上代码 新增内容&#xff1a; 1.onLaunch用法 2.onShow用法 3.onHide用法 4.应用更新API的调用模板 源码&#xff1a; App({//小程序初始化时触发&#xff0c;全局只触发一次onLaunch(option) {//可以获取场景值和启动参数&#xff0c;eg.optioncons…

golang通过go-git下载gitlab源码

1 申请令牌 方法1&#xff1a;具体项目下申请&#xff1a; 方法2&#xff1a;全局申请 2 获取token 3 下载代码 package mainimport ("fmt""os""github.com/go-git/go-git/v5" )func main() {_, err : git.PlainClone("/tmp/foo",…

数据结构和算法笔记4:排序算法-归并排序

归并排序算法完全遵循分治模式。直观上其操作如下&#xff1a; 分解&#xff1a;分解待排序的n个元素的序列成各具n/2个元素的两个子序列。解决&#xff1a;使用归并排序递归地排序两个子序列。合并&#xff1a;合并两个已排序的子序列以产生已排序的答案。 我们直接来看例子…

消失的她,GERBER失踪之谜

高速先生成员--王辉东 那天的雪好大&#xff0c;深深的脚印在在青春里安了家。 林如烟正倚在窗前&#xff0c;看着窗外的雪花飘飘撒撒。 她好想这一刻就去雪中奔跑潇洒。 赵理工偷偷看着林如烟的背影痴痴傻傻。 一切都显得那么静谥和诗意。 突然大师兄喊一句&#xff1a;“…

Transformer and Pretrain Language Models3-1

content transformer attention mechanism transformer structure​​​​​​​ pretrained language models language modeling pre-trained langue models(PLMs&#xff09; fine-tuning approaches PLMs after BERT applications of masked LM frontiers of PLMs …

Linux系统常用命令行指令

Linux系统是一种常用于开源项目开发的生产环境&#xff0c;因其免费、开源、安全、稳定的特点被广泛应用于手机、平板电脑、路由器、电视和电子游戏机等嵌入式系统中&#xff0c;能够更加简便地让用户知道系统是怎样工作的。前几日我安装好了Red Hat Enterprise Linux 9.0&…

秒级弹性!探索弹性调度与虚拟节点如何迅速响应瞬时算力需求?

作者&#xff1a;吴昆 前言 在前面的文章《弹性调度助力企业灵活应对业务变化&#xff0c;高效管理云上资源》中&#xff0c;我们介绍了阿里云容器服务 ACK 弹性调度为了帮助客户解决在使用云上弹性资源时&#xff0c;面对的“难以差异化控制业务资源使用量&#xff0c;缩容时…

边缘计算及相关产品历史发展

边缘计算及相关产品历史发展 背景边缘计算的历史CDN&#xff08;Content Delivery Network&#xff09;Cloudlet雾计算MEC&#xff08;Multi-Access Edge Computing&#xff0c;MEC&#xff09; 边缘计算的现状云计算厂商硬件厂商软件基金会 背景 最近&#xff0c;公司部分业务…

MySQL45道练习题

作业需要数据表SQL语句已给 1. 查询" 01 "课程比" 02 "课程成绩高的学生的信息及课程分数 select * from Student RIGHT JOIN (select t1.SId, class1, class2 from(select SId, score as class1 from sc where sc.CId 01)as t1, (select SId, score as …

『踩坑记录』Ubuntu安装python3-pip报错Package ‘python3-pip‘ has no installation candidate

文章目录 问题描述解决方法&#xff1a;添加apt的Universe库完 问题描述 sudo apt update;sudo aptupgrade后安装python3-pip仍然失败&#xff0c;报错&#xff1a; Package python3-pip is not available, but is referred to by another package. This may mean that the p…

环形链表的约瑟夫问题

前言 大家好呀&#xff0c;我是Humble&#xff0c;今天要分享的内容是环形链表的约瑟夫问题 说到链表&#xff0c;约瑟夫问题&#xff08;约瑟夫环&#xff09;绝对是一个经典的算法题&#xff0c;下面就让我们一起看一下吧~ 正文开始前&#xff0c;我们先看一个小小的故事&a…

视频监控平台EasyCVR增加fMP4流媒体视频格式及其应用场景介绍

近期我们在视频监控管理平台EasyCVR系统中新增了HTTP-FMP4播放协议&#xff0c;今天我们就来聊聊该协议的特点和应用。 fMP4&#xff08;Fragmented MPEG-4&#xff09;是基于MPEG-4 Part 12的流媒体格式&#xff0c;是流媒体的一项重要技术&#xff0c;因为它能通过互联网传送…

如何正确使用RC滤波网络

众所周知&#xff0c;最有效的滤波电路应靠近噪声源放置&#xff0c;滤波的作用是对噪声电流进行及时有效地阻止和转移&#xff0c;实际设计中&#xff0c;工程师经常使用高的串联阻抗&#xff08;电阻、电感和铁氧体&#xff09;阻止电流&#xff0c;并使用低的并联阻抗&#…

怎样使用崭新的硬盘

新买的一块硬盘&#xff0c;接到电脑上&#xff0c;打开机器&#xff0c;却找不到新的硬盘&#xff0c;怎么回事&#xff1f;新的硬盘是坏的么&#xff1f;怎样才能把新硬盘用起来&#xff1f; 可能有几种原因导致您的电脑无法识别新的硬盘。以下是一些建议的解决方法&#xff…

一个处理Range List的面试题解法

大纲 题目解法Rangeaddremove ToolsRangeListaddremove 代码 最近看到一个比较有意思的面试题。题目不算难&#xff0c;但是想把效率优化做好&#xff0c;也没那么容易。 我们先看下题目 题目 // Task: Implement a class named RangeList // A pair of integers define a ra…

解决 ssh: connect to host github.com port 22: Connection timed out

问题 今天使用git克隆github上的代码时&#xff0c;一直报错 原以为是公钥过期了&#xff0c;就尝试修改配置公钥&#xff0c;但是尝试了几次都不行&#xff0c;最终在博客上找到了解决方案&#xff0c;在次记录一下&#xff0c;以备不时之需 解决ssh-connect-to-host-github…

【实战教程】一文读懂防火墙本地Portal认证:让你的网络更安全!

往期精彩 【实战教程】防火墙设备登录配置&#xff0c;让你轻松掌握网络安全&#xff01;【实战教程】防火墙安全区域与策略实战指南&#xff1a;让你的网络安全防护如虎添翼&#xff01;【实战教程】防火墙常见NAT技术&#xff0c;让你一次看个够&#xff01;【实战教程】从零…
最新文章