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:
Qt Code:
  1. void MainWindow::on_checkBox_clicked()
  2. {
  3. if(ui->checkBox->isChecked())
  4. {
  5. connect(ui->checkBox, SIGNAL(stateChanged(int)), ui->pushButton_5, SLOT(setEnabled(true)));
  6. }
  7. }
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.