当前位置:网站首页>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() << "事件响应函数";
}
边栏推荐
- 35岁真就成了职业危机?不,我的技术在积累,我还越吃越香了
- Les mots ont été écrits, la fonction est vraiment puissante!
- 华为交换机S5735S-L24T4S-QA2无法telnet远程访问
- Coindesk comments on the decentralization process of the wave field: let people see the future of the Internet
- When creating body middleware, express Is there any difference between setting extended to true and false in urlencoded?
- The underlying principles and templates of new and delete
- Single machine high concurrency model design
- 80% of the people answered incorrectly. Does the leaf on the apple logo face left or right?
- Basic learning of SQL Server -- creating databases and tables with code
- STM32F1与STM32CubeIDE编程实例-旋转编码器驱动
猜你喜欢

How does the markdown editor of CSDN input mathematical formulas--- Latex syntax summary

【編程題】【Scratch二級】2019.12 飛翔的小鳥

【编程题】【Scratch二级】2019.09 绘制雪花图案

去了字节跳动,才知道年薪 40w 的测试工程师有这么多?
![[basis of recommendation system] sampling and construction of positive and negative samples](/img/4b/753a61b583cf38826b597fd31e5d20.png)
[basis of recommendation system] sampling and construction of positive and negative samples

【编程题】【Scratch二级】2019.12 飞翔的小鸟

智慧监管入场,美团等互联网服务平台何去何从

How to learn a new technology (programming language)

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

Detailed explanation of interview questions: the history of blood and tears in implementing distributed locks with redis
随机推荐
QT creator add custom new file / Project Template Wizard
Redis caching tool class, worth owning~
[the most detailed in history] statistical description of overdue days in credit
Go learning notes (2) basic types and statements (1)
他们齐聚 2022 ECUG Con,只为「中国技术力量」
Notice on organizing the second round of the Southwest Division (Sichuan) of the 2021-2022 National Youth electronic information intelligent innovation competition
Introduction to programming hardware
An error is reported during the process of setting up ADG. Rman-03009 ora-03113
Two small problems in creating user registration interface
Basic principle and usage of dynamic library, -fpic option context
【推荐系统基础】正负样本采样和构造
80% of the people answered incorrectly. Does the leaf on the apple logo face left or right?
Is 35 really a career crisis? No, my skills are accumulating, and the more I eat, the better
Cmake learning notes (1) compile single source programs with cmake
Open display PDF file in web page
The function is really powerful!
Zhou Hongqi, 52 ans, est - il encore jeune?
[programming problem] [scratch Level 2] 2019.09 make bat Challenge Game
ROS from entry to mastery (IX) initial experience of visual simulation: turtlebot3
服务器防御DDOS的方法,杭州高防IP段103.219.39.x