because you need to put void before MainWindow more than likely.
like this:
Qt Code:
  1. void MainWindow::somethingSlotIForgotName(){
  2. //do something
  3. }
To copy to clipboard, switch view to plain text mode 

Edit:: if it is a private/slot you have to declare it as void/unsigned/int/ect
if it is the public function (the main one for the class) you do not have to declare it.