window环境用Pycharm运行pyqt5代码python3.7,想实现GUI加载文档,然后根据文档内容重置frame,看前人博客说重置时需要removeWidget,然后再sip.delete,结果很诡异:
直接run模式,执行到sip这步直接退出了,没有报错。
用debug模式,没有warning也没有error,很平稳的通过。
self.layout.removeWidget(self.chkbox_selectAll)
sip.delete(self.chkbox_selectAll) # 退出位置,没有报错信息
关于报错信息,我在pycharm的configuration里面勾选“Emulateterminal in output console”后可以正常显示了:
TypeError: delete() argument 1 must be sip.simplewrapper, not QCheckBox