Qt Code:
  1. QPushButton *btn = ....;
  2. connect( btn, SIGNAL(clicked), this, SLOT(on_btn_slot()) );
To copy to clipboard, switch view to plain text mode 

To disable use disconnect( btn, 0, 0, 0 ), and connect( btn, SIGNAL(clicked), this, SLOT(on_btn_slot()) ); to connect again. No?