title: execution of custom qdialog
body: <p>I am getting an error while trying to run this Application ... the error message is:</p>
  
  <p>main.cpp(11): error: expression must have class type
        int r = dialog.exec(); and I am not sure why!!!</p>
  
  <p>I am using qmake to generate the make file... I have added the necessary files to the *.pro file since Dialog is inherited from  QDialog I should have access to the function exec!</p>
  
  <pre><code>#include &lt;QtGui&gt;
  #include &lt;QDialog&gt;
  #include &lt;QtUtil.h&gt;
  #include &lt;Mathematics.h&gt;
  #include &lt;Pair.h&gt;
  #include "View.h"
  
  class QMesseageBox;
  class QAction;
  class QDialogButtonBox;
  class QLabel;
  class QLineEdit;
  class QPushButton;
  class QTextEdit;
  
  class Dialog : public QDialog {
      Q_OBJECT
  public:
      Dialog() {
          QHBoxLayout *layout = new QHBoxLayout;
          // prevent left vertical box from growing when main window resized
          layout-&gt;addStretch(1);
  
          QLabel*      lab_Layers = new QLabel(tr("Layers"));
          d_inline   = new QLineEdit;
          d_inline-&gt;setText("50");
  
          scene = new QGraphicsScene(0, 0, 500, 500);
          view  = new View;
  
          layout-&gt;addWidget(view);
          view-&gt;setScene(scene);
  
          QVBoxLayout *mainLayout = new QVBoxLayout;
          mainLayout-&gt;addLayout(layout);
          setLayout(mainLayout);
          setWindowTitle(tr("VI Smooth 0.4"));    
      }
  
  private slots:
      // scroll the "after" window when "before" one is scrolled (so they
      // remain in sync)
  
  private:
      QAction* exitAction;
      QtUtil qt;
      QLineEdit*   d_inline;
      QGraphicsScene* scene;
      QGraphicsView*  view;
  };
  </code></pre>
  
  <p>main class</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QMessageBox&gt;
  #include "Dialog.h"
  
  int 
  main(int argc, char **argv) {
      QApplication app(argc, argv);
        argv++;
      Dialog dialog();
  //  dialog.showMaximized();
      int r = dialog.exec();
      return 0;
  }
  </code></pre>