Qt connect 使用经验记录 --- 持续更新中

1、
a-QAxObject从QAxBase继承来的信号,不能用最新版函数指针版connect,只能使用旧版的宏字符串版本connect。
b-旧版的宏字符串版本的connect关联的槽函数,必须是"访问修饰符+slots:"声明的槽函数。 否则会报错No Such slots。 
   我们知道,新版函数指针的版的connect,槽函数可以是普通的成员函数。

2、

非lambda方式关联connect,  第五个参数 Qt::DirectConnection, The slot is executed in the signalling thread. 信号发出线程跟槽函数执行线程,属于同一线程。  QObject * senderObj = sender();  获取不到信号发送对象。

非lambda方式关联connect,  第五个参数Qt::QueuedConnection或Qt::BlockingQueuedConnection,  The slot is executed in the receiver's thread.信号和槽函数不同线程。 sender()可以获取到信号的发送对象。

原文地址:https://www.cnblogs.com/azbane/p/12780418.html