Qt Code:
  1. connect( button, SIGNAL(clicked()), this, SLOT( on_button_clicked()));
  2.  
  3. This::on_button_clicked()
  4. {
  5. button->setEnabled(false);
  6. }
To copy to clipboard, switch view to plain text mode 

this does not work, of course. how to implement to disable a button when it is clicked?