当前位置:网站首页>QT adds resource files, adds icons for qaction, establishes signal slot functions, and implements
QT adds resource files, adds icons for qaction, establishes signal slot functions, and implements
2022-07-08 00:20:00 【Miaowei】
Qt List of articles
List of articles
Preface
Add Icon on toolbar 
One 、 Implementation steps
1. Add resources 

2. Defining variables 
3. Add Icon
trajectories_action_ = new QAction("trajectories");
trajectories_action_->setIcon(QIcon(":images/Add.ico"));
trajectories_action_->setCheckable(true);
tools_bar_->addAction(trajectories_action_);
4. Establish signal slot 
- Add time response slot function

void FastViewWidgetLayout::onTrajection()
{
qDebug() << " Event response function ";
}
边栏推荐
- Development of a horse tourism website (optimization of servlet)
- 商品的设计等整个生命周期,都可以将其纳入到产业互联网的范畴内
- Robomaster visual tutorial (1) camera
- Basic principle and usage of dynamic library, -fpic option context
- “一个优秀程序员可抵五个普通程序员”,差距就在这7个关键点
- 赞!idea 如何单窗口打开多个项目?
- Teach you to make a custom form label by hand
- Installation and configuration of sublime Text3
- Reading notes 004: Wang Yangming's quotations
- [programming problem] [scratch Level 2] March 2019 draw a square spiral
猜你喜欢

Detailed explanation of interview questions: the history of blood and tears in implementing distributed locks with redis

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

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

Daily question brushing record (16)

某马旅游网站开发(对servlet的优化)

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

深潜Kotlin协程(二十二):Flow的处理

Binder核心API

全自动化处理每月缺卡数据,输出缺卡人员信息

RPA云电脑,让RPA开箱即用算力无限?
随机推荐
51与蓝牙模块通讯,51驱动蓝牙APP点灯
快速上手使用本地测试工具postman
Binder核心API
Basic principle and usage of dynamic library, -fpic option context
“一个优秀程序员可抵五个普通程序员”,差距就在这7个关键点
If an exception is thrown in the constructor, the best way is to prevent memory leakage?
Notice on organizing the second round of the Southwest Division (Sichuan) of the 2021-2022 National Youth electronic information intelligent innovation competition
搭建ADG过程中复制报错 RMAN-03009 ORA-03113
RPA云电脑,让RPA开箱即用算力无限?
52歲的周鴻禕,還年輕嗎?
How does the markdown editor of CSDN input mathematical formulas--- Latex syntax summary
备库一直有延迟,查看mrp为wait_for_log,重启mrp后为apply_log但过一会又wait_for_log
Stm32f1 and stm32cubeide programming example - rotary encoder drive
如果在构造函数中抛出异常,最好的做法是防止内存泄漏?
【编程题】【Scratch二级】2019.12 飞翔的小鸟
How to insert highlighted code blocks in WPS and word
paddle入门-使用LeNet在MNIST实现图像分类方法二
攻防世界Web进阶区unserialize3题解
Introduction knowledge system of Web front-end engineers
数据库查询——第几高的数据?