QT中,创建子线程后,子线程使用QPlainTextEdit的insertPlainText报错:
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
解决方法:因为是在子线程中使用Qt的函数时,需要采用队列的形式调用,多个线程将操作入队;因此可以自行写两个函数(槽函数和信号函数),在主线程中连接这两个函数,子线程调用信号函数即可。
解决方案参考博主地址:https://www.cnblogs.com/daiguoxi/p/14014657.html