当前位置:网站首页>Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
2022-07-07 22:20:00 【妙为】
Qt系列文章目录
前言
在工具栏上添加图标
一、实现步骤
1.添加资源

2.定义变量
3.加入图标
trajectories_action_ = new QAction("trajectories");
trajectories_action_->setIcon(QIcon(":images/Add.ico"));
trajectories_action_->setCheckable(true);
tools_bar_->addAction(trajectories_action_);
4.建立信号槽
- 添加时间响应槽函数

void FastViewWidgetLayout::onTrajection()
{
qDebug() << "事件响应函数";
}
边栏推荐
- Emotional post station 010: things that contemporary college students should understand
- LinkedBlockingQueue源码分析-新增和删除
- Fully automated processing of monthly card shortage data and output of card shortage personnel information
- The standby database has been delayed. Check that the MRP is wait_ for_ Log, apply after restarting MRP_ Log but wait again later_ for_ log
- [研发人员必备]paddle 如何制作自己的数据集,并显示。
- How to insert highlighted code blocks in WPS and word
- Go learning notes (1) environment installation and hello world
- How to measure whether the product is "just needed, high frequency, pain points"
- Scrapy framework
- 【编程题】【Scratch二级】2019.03 绘制方形螺旋
猜你喜欢

When creating body middleware, express Is there any difference between setting extended to true and false in urlencoded?

【编程题】【Scratch二级】2019.03 垃圾分类

Trust orbtk development issues 2022

Development of a horse tourism website (realization of login, registration and exit function)
![Binary sort tree [BST] - create, find, delete, output](/img/e4/a950607f8b76bc7f8d56063dd72126.png)
Binary sort tree [BST] - create, find, delete, output
![[programming problem] [scratch Level 2] December 2019 flying birds](/img/5e/a105f8615f3991635c9ffd3a8e5836.png)
[programming problem] [scratch Level 2] December 2019 flying birds

80%的人答错,苹果logo上的叶子到底朝左还是朝右?

第四期SFO销毁,Starfish OS如何对SFO价值赋能?

QT and OpenGL: load 3D models using the open asset import library (assimp)

Install sqlserver2019
随机推荐
QT and OpenGL: load 3D models using the open asset import library (assimp)
How to measure whether the product is "just needed, high frequency, pain points"
Basic learning of SQL Server -- creating databases and tables with code
[question de programmation] [scratch niveau 2] oiseaux volants en décembre 2019
80%的人答错,苹果logo上的叶子到底朝左还是朝右?
Zhou Hongqi, 52 ans, est - il encore jeune?
Go learning notes (2) basic types and statements (1)
玩轉Sonar
[研发人员必备]paddle 如何制作自己的数据集,并显示。
PostGIS learning
Is 35 really a career crisis? No, my skills are accumulating, and the more I eat, the better
C# 泛型及性能比较
Prompt configure: error: required tool not found: libtool solution when configuring and installing crosstool ng tool
Using Google test in QT
Emotional post station 010: things that contemporary college students should understand
什么是负载均衡?DNS如何实现负载均衡?
[programming problem] [scratch Level 2] draw ten squares in December 2019
深潜Kotlin协程(二十三 完结篇):SharedFlow 和 StateFlow
Vscode software
单机高并发模型设计