Qt笔记-解决QObject::startTimer: Timers cannot be started from another thread
生活随笔
收集整理的這篇文章主要介紹了
Qt笔记-解决QObject::startTimer: Timers cannot be started from another thread
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
原因是QTime或QTImeLine這類,多線程中創建和調用要在一個線程中。
因為構造函數在main線程中創建的,run是子線程中,所有,這部分代碼的new要在run中去new就可以了。
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的Qt笔记-解决QObject::startTimer: Timers cannot be started from another thread的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: canvas笔记-在canvas中使用其
- 下一篇: Qt文档阅读笔记-ToolBar QML