QThread and QTimer

后端 未结 4 2171
感情败类
感情败类 2020-12-19 19:27

I\'m working on an application developed with Qt 4.6.

I want to create a custom timer that counts in a separate thread. However, I want this timer to be able to send

4条回答
  •  旧时难觅i
    2020-12-19 20:11

    Probable reason can be, your timer object is not in a thread with event loop. Event loop is required to trigger the signals.

    However, I would suggest that you should not go with this approach. Timers use different mechanism on different platform and your code might not behave as expected on different platform.

提交回复
热议问题