c11新特性中加入了lambda表达式,所以Qt 也支持

需在.pro文件中加入

CONFIG += c++11

   m_timer = new QTimer();
    m_timer->start(1000);
    connect(m_timer,&QTimer::timeout,[](){
        qDebug() << "timeout";
    });

 

相关文章:

  • 2021-07-11
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2021-09-14
  • 2022-12-23
  • 2021-06-27
  • 2021-09-04
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案