Hi,
I'm having the following error while using Signals and Slots with QCheckBox. The following is my code snippet.
In my mainwindow.cpp file:
void MainWindow::on_checkBox_clicked()
{
if(ui->checkBox->isChecked())
{
connect(ui->checkBox, SIGNAL(stateChanged(int)), ui->pushButton_5, SLOT(setEnabled(true)));
}
}
void MainWindow::on_checkBox_clicked()
{
if(ui->checkBox->isChecked())
{
connect(ui->checkBox, SIGNAL(stateChanged(int)), ui->pushButton_5, SLOT(setEnabled(true)));
}
}
To copy to clipboard, switch view to plain text mode
It underlines the connect() line in red when I use 3 )'s followed by ; and when I remove one ) and compile it, I get an error saying "expected ')' before ';' token". I'm not able to figure out which part I'm making a mistake. Please help. Thanks in advance.
Bookmarks