当前位置:网站首页>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() << "事件响应函数";
}
边栏推荐
- Jouer sonar
- C language 001: download, install, create the first C project and execute the first C language program of CodeBlocks
- Play sonar
- Fully automated processing of monthly card shortage data and output of card shortage personnel information
- 【编程题】【Scratch二级】2019.12 飞翔的小鸟
- Les mots ont été écrits, la fonction est vraiment puissante!
- 全自动化处理每月缺卡数据,输出缺卡人员信息
- 应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
- 腾讯安全发布《BOT管理白皮书》|解读BOT攻击,探索防护之道
- Basic learning of SQL Server -- creating databases and tables with the mouse
猜你喜欢
Two small problems in creating user registration interface
某马旅游网站开发(登录注册退出功能的实现)
[leetcode] 20. Valid brackets
ROS从入门到精通(九) 可视化仿真初体验之TurtleBot3
【编程题】【Scratch二级】2019.03 绘制方形螺旋
Notice on organizing the second round of the Southwest Division (Sichuan) of the 2021-2022 National Youth electronic information intelligent innovation competition
Development of a horse tourism website (realization of login, registration and exit function)
大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
【编程题】【Scratch二级】2019.09 绘制雪花图案
备库一直有延迟,查看mrp为wait_for_log,重启mrp后为apply_log但过一会又wait_for_log
随机推荐
【推荐系统基础】正负样本采样和构造
51与蓝牙模块通讯,51驱动蓝牙APP点灯
The function is really powerful!
Robomaster visual tutorial (0) Introduction
关于组织2021-2022全国青少年电子信息智能创新大赛西南赛区(四川)复赛的通知
Teach you to make a custom form label by hand
Open display PDF file in web page
The difference between -s and -d when downloading packages using NPM
Reading notes 004: Wang Yangming's quotations
How does the markdown editor of CSDN input mathematical formulas--- Latex syntax summary
玩转Sonar
The underlying principles and templates of new and delete
【编程题】【Scratch二级】2019.09 制作蝙蝠冲关游戏
Two small problems in creating user registration interface
什么是负载均衡?DNS如何实现负载均衡?
new和delete的底层原理以及模板
QT and OpenGL: loading 3D models using the open asset import library (assimp) - Part 2
How to insert highlighted code blocks in WPS and word
Handwriting a simulated reentrantlock
How to learn a new technology (programming language)