Should I use QCoreApplication::processEvents() or QApplication::processEvents()?

前端 未结 2 1448
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 12:47

I have a method which is called from both QThreads and the main thread. this method can sometimes take a long time to do its computations in a loop so I put

2条回答
  •  有刺的猬
    2020-11-30 13:17

    Neither, processEvent() should be calld only when you have actual pending events to process. You may find this useful : How to make Qt work when main thread is busy?

提交回复
热议问题