QT添加工具栏_五个板栗的技术博客_51CTO博客
source link: https://blog.51cto.com/u_15515702/5907067
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
QT添加工具栏
精选 原创- 在工程文件中,找到进入UI界面,左击UI界面,出现如下图,选择Add tool Bar to other Area,选择你想放置的位置,如果默认在顶部,直接选择添加工具栏。
如图我添加到了左侧
2.点击Action Editor ,然后点击新建,出现下图对话框
填写文本,设置图标(设置图标需要事前进行第3条)等
3.点击项目,添加新文件,选择QT resource file,
点击下一步,填写文件名(名字可随意)
4.完成后,出现如下界面,拖动图标到工具栏处,拖动的时候当工具栏出现一条红线,就能放置到工具栏上了
5.运行的效果如下图
将图标和文本信息一起显示
//将文本信息显示在图标的下方
- 赞
- 收藏
- 评论
- 分享
- 举报
上一篇:QT设置窗口图标
Recommend
-
2
一、Qt的介绍Qt是一个跨平台的C++图形用户界面应用程序框架。支持Linux、类Unix系统、windows、Mac os以及嵌入式平台。Linux的图形界面有KDE和gnome,其中KDE就是用Qt写的MSVC和MinGW是两种不同的编译器...
-
4
gcc GNU C语言编译器gcc GNU C++语言编译器ld GNU链接器,将目标文件和库函数链接起来,创建可执行程序和动态链接库ar 生成静态库.a,可以编辑和管理静态链接库make 生成器,根据makefile文件自动编译链接生成...
-
5
一、QPainter绘图1.整个绘图系统基于Qpainter,QPianterDevice和QPainEngine三个类2.QPainter用来执行绘制的操作,QPaintDevice是一个二维空间的抽象,这个二维空间允许QPainter在上面进行绘制,也就是QPainter的工作空间。3.QPiantE...
-
4
Qt程序打包 原创 五个板栗 2022-08-11 17:35:30...
-
4
Qt提供的所有的Socket类都是非阻塞的Qt中常用的用于Socket通信的套接字类QTcpServer:用于TCP/IP通信,作为服务器端套接字使用QTcpSocket:用于TCP/IP通信,作为客户端套接字使用QUdpSocket:用于UDP通信,服务器客服端都使用此套接字。...
-
3
QT学习第六天 精选 原创 五个板栗 2022-08-23 16:38:01...
-
5
Qt字符串操作 精选 原创 五个板栗 2022-08-26 16:37:07...
-
2
Qt常用快捷键 精选 原创 五个板栗 2022-09-19 10:40:56...
-
7
QT小结1 精选 原创 五个板栗 2022-09-22 14:25:02...
-
1
QT添加下拉框 精选 原创 五个板栗 2022-12-05 16:37:36...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK