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()可以获取到信号的发送对象。

相关文章:

  • 2021-08-31
  • 2021-06-04
  • 2022-12-23
  • 2021-08-28
  • 2021-08-01
  • 2021-06-28
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2021-12-25
  • 2021-04-23
  • 2022-12-23
  • 2022-02-12
  • 2021-06-19
  • 2021-06-12
  • 2021-06-25
相关资源
相似解决方案