当前位置:网站首页>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() << "事件响应函数";
}
边栏推荐
- How to measure whether the product is "just needed, high frequency, pain points"
- 单机高并发模型设计
- Is it safe for tongdaxin to buy funds?
- Problems faced when connecting to sqlserver after downloading (I)
- 51与蓝牙模块通讯,51驱动蓝牙APP点灯
- 手写一个模拟的ReentrantLock
- Installation and configuration of sublime Text3
- Solutions to problems in sqlserver deleting data in tables
- 【编程题】【Scratch二级】2019.03 绘制方形螺旋
- Go learning notes (1) environment installation and hello world
猜你喜欢

RPA cloud computer, let RPA out of the box with unlimited computing power?

Trust orbtk development issues 2022

RPA云电脑,让RPA开箱即用算力无限?

每日刷题记录 (十六)

快速上手使用本地测试工具postman

关于组织2021-2022全国青少年电子信息智能创新大赛西南赛区(四川)复赛的通知

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

应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设

Go learning notes (1) environment installation and hello world

How to measure whether the product is "just needed, high frequency, pain points"
随机推荐
深潜Kotlin协程(二十二):Flow的处理
玩轉Sonar
How to add automatic sorting titles in typora software?
第四期SFO销毁,Starfish OS如何对SFO价值赋能?
Reading notes 004: Wang Yangming's quotations
攻防世界Web进阶区unserialize3题解
搭建ADG过程中复制报错 RMAN-03009 ORA-03113
Development of a horse tourism website (optimization of servlet)
Coindesk comments on the decentralization process of the wave field: let people see the future of the Internet
Zhou Hongqi, 52 ans, est - il encore jeune?
QT and OpenGL: loading 3D models using the open asset import library (assimp) - Part 2
Flask learning record 000: error summary
[basis of recommendation system] sampling and construction of positive and negative samples
Operating system principle --- summary of interview knowledge points
How to measure whether the product is "just needed, high frequency, pain points"
Open display PDF file in web page
C language 001: download, install, create the first C project and execute the first C language program of CodeBlocks
单机高并发模型设计
Robomaster visual tutorial (1) camera
Sqlite数据库存储目录结构邻接表的实现2-目录树的构建