title: Qt best way to invoke methods of QMainWindow from other widget
body: <p>I have main window from type <code>QMainWindow</code>, then I set some widget and give this widget the <code>QMainWindow</code> as parent in its constructor , the <code>QMainWindow</code> passed as Object.
  now I need from this widget invoke method from the QMainWindow. 
  what will be the best way to do it ?</p>
  
  <p>this is how the widget looks like:</p>
  
  <pre><code>DataListModel::DataListModel( QObject *parent ) :
               QStandardItemModel( 0, 0, parent ) 
  
  {
  // here I like to invoke some QMainWindow method? 
  //can I cast somehow the parent ? or use some pointer ?
  
  }
  </code></pre>