Connect the signal to the slot in your code using QObject::connect(). For example:

In the header file:

Qt Code:
  1. class MyClass : public QWidget, private Ui::MyWidget {
  2. Q_OBJECT
  3.  
  4. public:
  5. MyClass(QWidget *parent = 0);
  6.  
  7. public slots:
  8. void mySlot();
  9. }
To copy to clipboard, switch view to plain text mode 

In the source file:
Qt Code:
  1. MyClass::MyClass(QWidget *parent)
  2. : QWidget(parent)
  3. {
  4. setupUi(this);
  5.  
  6. connect(m_button, SIGNAL(clicked()),
  7. this, SLOT(mySlot()));
  8. }
To copy to clipboard, switch view to plain text mode