文章詳情頁(yè)
python3 PyQt5 多線程報(bào)錯(cuò),QObject: Cannot
瀏覽:92日期:2022-06-29 08:53:20
問題描述
錯(cuò)誤信息如下:`QObject: Cannot create children for a parent that is in a different thread.(Parent is QTextDocument(0x27e4150), parent’s thread is QThread(0xc306a0), current thread is QThread(0xc0eca0)`求解。。有沒有遇到這種問題情況?
問題解答
回答1:GUI相關(guān)的對(duì)象不能在非GUI的線程創(chuàng)建和使用,是非線程安全的
排行榜

熱門標(biāo)簽