1 friend class 结合 QThread , 传入class参数, 执行run()
2 继承QThread直接实现myThread类,run()
3 实现OBJ类, movetothread(), //这个是推荐方法
//1 2 方法 不推荐使用. 网上有相关的说明.
QThread使用技巧
本文介绍了三种使用QThread的方法:通过friendclass结合QThread并传入class参数执行run();继承QThread实现myThread类;实现OBJ类并通过movetothread()进行操作。推荐使用第三种方法。
1 friend class 结合 QThread , 传入class参数, 执行run()
2 继承QThread直接实现myThread类,run()
3 实现OBJ类, movetothread(), //这个是推荐方法
//1 2 方法 不推荐使用. 网上有相关的说明.

被折叠的 条评论
为什么被折叠?