解决:

我的原因main函数之中没有QCoreApplication::exec()函数的执行,这样我的定时器启动后main函数就退出了

 

如果是正常Qt cretor创建的工程,main函数中会有return a.exec(),而这会让程序进程不结束,也就是可以接收到timer的timeout信号了。

相关文章:

  • 2021-05-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-07-25
相关资源
相似解决方案