下面的emit signal line中的第3个参数有问题。如图所示,程序在标题中生成错误:
exception_caught = pyqtSignal(str, str, types.TracebackType)
def exception_handler(self, excepthook):
"""Handler for uncaught exceptions
:param excepthook: Exception handle function
:type excepthook: function
"""
def wrapper(error_type, error_obj, traceback):
"""Wrapper to handle the exceptions
:param error_type: Exception class
:type error_type: type
:param error_obj: Exception instance
:type error_obj: Exception
:param traceback: Traceback object
:type traceback: TracebackType
"""
sys.callstats()
self.exception_caught.emit(str(error_obj), "error", traceback)
excepthook(error_type, error_obj, traceback)
return wrapper
如果我尝试其他组合:
^{pr2}$然后,错误是参数3意外地是None
。在
使用Qt5 5.7、PyQt5 5.7、Python3 3 3.5.1
目前没有回答
相关问题 更多 >
编程相关推荐