TypeError: arguments did not match any overloaded call:
时间: 2024-05-26 09:12:12 浏览: 36
I'm sorry, but without additional context, it's difficult to provide a specific answer to your error message. Can you please provide more information about the code you're working on and what you're trying to accomplish? Also, please let me know if you need any assistance with anything else.
相关问题
依据报如下错误: audio_out = QAudioDeviceInfo(devtxt) TypeError: arguments did not match any overloaded call: QAudioDeviceInfo(): too many arguments QAudioDeviceInfo(QAudioDeviceInfo): argument 1 has unexpected type 'str'
这个错误的原因是你在调用 QAudioDeviceInfo(devtxt) 的时候传递了一个字符串类型的参数,而实际上它需要的参数类型是 QAudioDeviceInfo 类型。你可以使用 QAudioDeviceInfo::availableDevices(QAudio::Mode mode) 方法来获取可用的音频设备列表,并从中选择一个合适的设备来创建 QAudioDeviceInfo 对象。具体的实现方式可以参考 Qt 官方文档以及相关的例子。
TypeError: arguments did not match any overloaded call: QStandardItemModel(parent: typing.Optional[QObject] = None): argument 1 has unexpected type 'int' QStandardItemModel(rows: int, columns: int, parent: typing.Optional[QObject] = None): not enough arguments
这个错误是因为你在创建 QStandardItemModel 时,传递的参数类型与该函数所接受的参数类型不匹配。根据错误提示,QStandardItemModel 可以接受两种不同类型的参数:
1. 不传递参数,即使用默认参数。此时 QStandardItemModel 会以 None 作为 parent 参数创建一个空模型。
2. 传递 rows 和 columns 参数来指定模型的行数和列数,可以同时传递 parent 参数。
你的错误提示显示,你传递了一个 int 类型的参数,这个参数并不是 QStandardItemModel 所接受的任何一种参数类型。请确保你传递的参数类型与 QStandardItemModel 所需的参数类型匹配。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![mp4](https://img-home.csdnimg.cn/images/20210720083504.png)