Have you ever heard about signals and slots mechanism? Create slot, where you'll call one of those methods and connect it to clicked() signal.

Let's say that your button is named "pushButton1" and your window class name is "Window"

window.h
Qt Code:
  1. (...)
  2. protected slots:
  3. void resizeWindow();
  4. (...)
To copy to clipboard, switch view to plain text mode 

window.cpp
Qt Code:
  1. Window::Window(...)
  2. {
  3. (...)
  4. connect(ui->pushButton1, SIGNAL(clicked()), this, SLOT(resizeWindow()));
  5. (...)
  6. }
  7.  
  8. void Window::resizeWindow(){
  9. /* here do what you want
  10.  this->resize(QSize(x, y));
  11.  for example */
  12. }
To copy to clipboard, switch view to plain text mode