要使用QtConcurrent 名字空间 run函数。 必须包含#include <QtConcurrentRun>头文件,否则报错:run不是QtConcurrent的成员函数。 或者,直接包含#include <QtCore>