Hey!

I have a problem that I can't figure out..any help would be great

I'm a beginner at Qt and I'm trying to figure this out but I'm getting an error

My GUI should function such that on a specific button press a new window pops up and the old one shuts...
I got the new window to pop up and stuff and everything works fine..but i can't figure out how to close the old one... any pointers??

Qt Code:
  1. #include <QtGui>
  2. #include "guistart.h"
  3. //#include "addcluster.h"
  4.  
  5. // if we include <QtGui> there is no need to include every class used: <QString>, <QFileDialog>,...
  6.  
  7. guiStart::guiStart(QMainWindow *parent)
  8. {
  9. setupUi(this); // this sets up GUI
  10.  
  11. // signals/slots mechanism in action
  12. connect( nextButton, SIGNAL( clicked() ), this, SLOT( addClusterWindow() ) );
  13. }
  14.  
  15.  
  16. void guiStart::addClusterWindow()
  17. {
  18. addCluster *window = new addCluster();
  19. window->show();
  20. this.close();
  21. }
To copy to clipboard, switch view to plain text mode 

All my windows are QMainWindow .

The above code gives me this error
Qt Code:
  1. guistart.cpp: In member function ‘void guiStart::addClusterWindow()’:
  2. guistart.cpp:20:7: error: request for member ‘close’ in ‘this’, which is of non-class type ‘guiStart* const’
To copy to clipboard, switch view to plain text mode 

I know there's a problem with the this.close()

Any help would be great guys!! Thanks!