当前位置:网站首页>LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());
LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());
2022-07-02 18:49:00 【Licht powder】
When one Object emit One signal When , It's a sender, The system will record who is currently emit Out of this signal Of , So we can get which signal to send from the corresponding slot function
There could be multiple Object Of signal Will be connected to the same signal( For example, more than one Button May be connect To a slot function onClick()), Therefore, it is necessary to judge which Object emit With this signal, according to sender Different to deal with different
QObject::Sender() Returns the pointer of the object that sent the signal , The return type is QObject *
The following example :
void LightLibCreateWidget::slotEffectCBClicked()
{
// Set selection button
LightGroupButton* sender = static_cast<LightGroupButton*>(QObject::sender());
m_iSelectBtnIndex = sender->getLightIndex();
}
边栏推荐
- 彻底搞懂基于Open3D的点云处理教程!
- Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
- StretchDIBits函数
- options should NOT have additional properties
- Leetcode 面试题 16.17. 连续数列
- Responses of different people in technology companies to bugs | daily anecdotes
- Hongmeng's fourth learning
- 【每日一题】第一天
- Esp32-c3 introductory tutorial question ⑩ - error: implicit declaration of function 'ESP_ blufi_ close‘;
- How to clean up discarded PVs and their corresponding folders
猜你喜欢
【每日一题】第二天
【西北工业大学】考研初试复试资料分享
又一所双非改考408,会爆冷么?南昌航空大学软件学院
再放寬!這些應届生,可直接落戶上海
文字编辑器 希望有错误的句子用红色标红,文字编辑器用了markdown
初夏,开源魔改一个带击杀音效的电蚊拍!
Ue4 dessine un cercle avec une ligne de contour
Redis (7) -- database and expiration key
In early summer, Kaiyuan magic changed an electric mosquito racket with killing sound effect!
第一次去曼谷旅游怎么玩?这份省钱攻略请收好
随机推荐
元宇宙链游系统开发(逻辑开发)丨链游系统开发(详细分析)
Paddlepaddle 28 build an automatic coder based on convolution
What are the links of the problem
Typical application of "stack" - expression evaluation (implemented in C language)
1.5.1版本官方docker镜像运行容器,能设置使用 mysql 8驱动吗?
Rte11 interrupt decoupling function
M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
【愚公系列】2022年07月 Go教学课程 001-Go语言前提简介
昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
NM02-独立于总线协议的NM模块调用序列图及代码解释
Leetcode(154)——寻找旋转排序数组中的最小值 II
Leetcode 面试题 17.04. 消失的数字
科技公司不同人对Bug的反应 | 每日趣闻
Leetcode 面试题 16.15. 珠玑妙算
Summary of fun free GM games
Implementation shadow introduction
Qt Official examples: Qt Quick Controls - Gallery
Server PHP environment building tutorial, PHP server environment building graphic explanation
Unity学习shader笔记[八十一]简单的颜色调整后处理(亮度,饱和度,对比度)