当前位置:首页 >> 编程语言 >> 【Pyqt】QObject--connect- Cannot queue arguments of type ‘QTextCursor‘,htc omega

【Pyqt】QObject--connect- Cannot queue arguments of type ‘QTextCursor‘,htc omega

0evadmin 编程语言 2
文件名:【Pyqt】QObject--connect- Cannot queue arguments of type ‘QTextCursor‘,htc omega 【Pyqt】QObject::connect: Cannot queue arguments of type ‘QTextCursor‘

问题说明 文本框接收到新的数据 不会自动滚动,并提示警告 QObject::connect: Cannot queue arguments of type ‘QTextCursor’ (Make sure ‘QTextCursor’ is registered using qRegisterMetaType().) 原因 线程回来的槽函数里面 调用了ui的代码 我们不能通过线程来修改UI,较为安全的修改用户界面的方式是向UI窗口发送信号(signal) 参考 PyQt报错 QObject::connect: Cannot queue arguments of type ‘QTextCursor‘ 解决办法 不是直接调用textBrowser.append函数,而是发送一个信号,连接的槽函数再调用textBrowser.append

协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐
«    2025年12月    »
1234567
891011121314
15161718192021
22232425262728
293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接