TypeError: argument 1 has unexpected type 'NoneType'(解决办法)

原文链接: https://stackoverflow.com/questions/45793966/clicked-connect-error

self.search.clicked.connect(self.search_information(e))

在使用connect时,报TypeError: argument 1 has unexpected type 'NoneType'错误,解决办法:

self.search.clicked.connect(lambda:self.search_information(e))

我个人理解是,当用connect时,里面调用函数时,需要给他用lambda定义

猜你喜欢

转载自blog.csdn.net/sinat_36188088/article/details/102717700
今日推荐