TypeError: descriptor 'findChild' for 'PySide6.QtCore.QObject' objects doesn't apply to a 'str' object
时间: 2023-12-24 09:03:47 浏览: 225
TypeError document.getElementById(...) is null错误原因
这个报错是因为在代码中使用了错误的语法。具体来说,错误的地方是在使用`list.index()`方法时,没有将列表作为方法的调用者。正确的语法应该是`a.index('ad')`,其中`a`是列表对象,而不是`list`。所以正确的代码应该是`print(a.index('ad'))`。\[1\]
另外,引用\[3\]中提到的错误与你的问题无关,它是关于无标题栏窗口不能使用鼠标移动的问题的代码错误。所以这个引用与你的问题无关。
希望这个解答对你有帮助!如果还有其他问题,请随时提问。
#### 引用[.reference_title]
- *1* [已解决TypeError: descriptor ‘index‘ for ‘list‘ objects doesn‘t apply to a ‘str‘ object](https://blog.csdn.net/yuan2019035055/article/details/126890028)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [【Python】TypeError: descriptor ‘append‘ for ‘list‘ objects doesn‘t apply to a ‘str‘ object](https://blog.csdn.net/qq_42203652/article/details/125619463)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [报错TypeError: ‘PySide2.QtCore.QObject.connect‘ called with wrong argument types](https://blog.csdn.net/KeY__CZN/article/details/125953967)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文