The error message suggests that there is no matching function for the connect call.

The issue might be with the connection syntax. Instead of using the lambda function directly, you can define a slot in your class and connect it to the currentIndexChanged signal of the QComboBox. Here's an example:

// Define a slot in your class
void UsersWidget::on_modeComboBox_currentIndexChanged(const QString& mode) {
    // Your slot implementation
}

// Connect the signal to the slot
connect(ui->mode, QOverload<const QString&>::of(&QComboBox::currentIndexChanged), this, &UsersWidget::on_modeComboBox_currentIndexChanged);

Make sure to replace UsersWidget with the appropriate class name if you are using a different class.

connectui-mode &QComboBoxcurrentIndexChanged this thisconst QString& mode on_modeComboBox_currentIndexChangedmode;提示GQtClientSmarthome_Clientuserswidgetcpp40 error no matching function for call

原文地址: https://www.cveoy.top/t/topic/izA1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录