当前位置:网站首页>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() << "事件响应函数";
}
边栏推荐
- Development of a horse tourism website (realization of login, registration and exit function)
- Solution to prompt configure: error: curses library not found when configuring and installing crosstool ng tool
- Problems faced when connecting to sqlserver after downloading (I)
- 【转载】解决conda安装pytorch过慢的问题
- The function is really powerful!
- Robomaster visual tutorial (11) summary
- RPA云电脑,让RPA开箱即用算力无限?
- Preliminary test of optical flow sensor: gl9306
- 【obs】Impossible to find entrance point CreateDirect3D11DeviceFromDXGIDevice
- Coindesk comments on the decentralization process of the wave field: let people see the future of the Internet
猜你喜欢

Go learning notes (2) basic types and statements (1)

QT and OpenGL: loading 3D models using the open asset import library (assimp) - Part 2

Les mots ont été écrits, la fonction est vraiment puissante!

爬虫实战(八):爬表情包
![[programming questions] [scratch Level 2] March 2019 garbage classification](/img/08/9f7ebf4302c9239784751b579c9efc.png)
[programming questions] [scratch Level 2] March 2019 garbage classification

The result of innovation in professional courses such as robotics (Automation)

Fully automated processing of monthly card shortage data and output of card shortage personnel information

SQL connection problem after downloading (2)

How to learn a new technology (programming language)

面试题详解:用Redis实现分布式锁的血泪史
随机推荐
【编程题】【Scratch二级】2019.03 绘制方形螺旋
从Starfish OS持续对SFO的通缩消耗,长远看SFO的价值
【leetcode】day1
[研发人员必备]paddle 如何制作自己的数据集,并显示。
How to learn a new technology (programming language)
Development of a horse tourism website (realization of login, registration and exit function)
Single machine high concurrency model design
1293_FreeRTOS中xTaskResumeAll()接口的实现分析
Is Zhou Hongyi, 52, still young?
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
The difference between -s and -d when downloading packages using NPM
手写一个模拟的ReentrantLock
快速上手使用本地测试工具postman
52岁的周鸿祎,还年轻吗?
C language 001: download, install, create the first C project and execute the first C language program of CodeBlocks
Coindesk comments on the decentralization process of the wave field: let people see the future of the Internet
Development of a horse tourism website (optimization of servlet)
每日刷题记录 (十六)
单机高并发模型设计
某马旅游网站开发(登录注册退出功能的实现)