title: Call method in QMainWindow from QDialog
body: <p>I am running this to show a dialog window from main:</p>
  
  <pre><code>void SQLWindow::on_action_4_triggered()
  { 
     HeaderList window; 
     window.show(); 
     window.exec(); 
  }
  </code></pre>
  
  <p>Here I am trying to connect a saveButtonClicked() to the SLOT in the Main Window:</p>
  
  <pre><code>HeaderList::HeaderList(QWidget *parent) : QDialog(parent), ui(new Ui::HeaderList) 
  { 
     connect(this, SIGNAL(saveButtonClicked()), SQLWindow, SLOT(hideColumns())); 
  
     ui-&gt;setupUi(this); 
  }
  </code></pre>
  
  <p>but getting an error: "expected primary-expression before ',' token" which points at "SQLWindow". I am doing this wrong, obviously. Any ideas how to call a method in Main Window from Dialog?</p>