Hi

I want to have a hidden checkbox be checked or unchecked depending on which one of two buttons the user presses.

In the mainwindow.ui I've made a connection from one button to the checkbox and selected "clicked()" for the button and "click()" for the check box.

When I run the program the box checks and unchecks when I click the button. My problem is that the check box begins as checked, but I want it to start off as unchecked. Is there a way I can do this?

So far I've tried:
Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::MainWindow)
  4. {
  5. QCheckBox checkBox;
  6. checkBox.setChecked( false );
To copy to clipboard, switch view to plain text mode