C++/Qt - QThread vs QRunnable

前端 未结 3 2059
广开言路
广开言路 2020-12-29 09:03

What are the differences between QThreads and QRunnable ?

When should I use QThread and when QRunnable ?

3条回答
  •  無奈伤痛
    2020-12-29 09:40

    The QRunnable class and the QtConcurrent::run() function are well suited to situations where we want to perform some background processing in one or more secondary threads without needing the full power and flexibility provided by QThread.

    from "Advanced Qt Programming: Creating Great Software with C++ and Qt 4" by Mark Summerfield

提交回复
热议问题