paintEvent() missing 1 required positional argument
时间: 2023-10-19 15:07:42 浏览: 136
错误"paintEvent() missing 1 required positional argument"可能是由于在调用paintEvent方法时缺少了一个必需的位置参数。根据引用中的解释,对于方法调用,对象会作为函数的第一个参数传递。因此,在调用paintEvent方法时,可能需要传递一个参数才能满足方法定义的要求。你可以检查一下在调用paintEvent方法时是否缺少了必要的参数。另外,根据引用的建议,你可以删除Button的command参数中的event,这样可能可以解决这个错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [TypeError() missing 1 required positional argument: 'event'or: <lambda>](https://blog.csdn.net/C2496649361/article/details/80869096)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [My Python Summary](https://blog.csdn.net/luoshenhappy99/article/details/8663384)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文