title: How to get QT 4.8 apps running with Netbeans 7.3?
body: <p>I followed <a href="http://netbeans.org/kb/docs/cnd/qt-applications.html" rel="nofollow">Netbeans' guide</a> to create a basic application with QT.
  The project builds successfully but fail to Run with no explanation.</p>
  
  <p>I'm running W8 x64 with MinGW and QT4.8 (downloaded from netbeans' guide links).</p>
  
  <p>Here is the C++ files code (for the most part created automatically) : </p>
  
  <p>main.cpp :</p>
  
  <pre><code>#include &lt;QtGui/QApplication&gt;
  #include "UI_main.h"
  
  int main(int argc, char *argv[]) {
      // initialize resources, if needed
      // Q_INIT_RESOURCE(resfile);
  
      QApplication app(argc, argv);
  
      // create and show your widgets here
      UI_main main_w;
      main_w.show();
  
      return app.exec();
  }
  </code></pre>
  
  <p>UI_main.h : </p>
  
  <pre><code>#ifndef _UI_MAIN_H
  #define _UI_MAIN_H
  
  #include "ui_UI_main.h"
  
  class UI_main : public QMainWindow {
      Q_OBJECT
  public:
      UI_main();
      virtual ~UI_main();
  private:
      Ui::UI_main widget;
  };
  
  #endif  /* _UI_MAIN_H */
  </code></pre>
  
  <p>ui_UI_main.h :</p>
  
  <pre><code>#ifndef UI_UI_MAIN_H
  #define UI_UI_MAIN_H
  
  #include &lt;QtCore/QVariant&gt;
  #include &lt;QtGui/QAction&gt;
  #include &lt;QtGui/QApplication&gt;
  #include &lt;QtGui/QButtonGroup&gt;
  #include &lt;QtGui/QGroupBox&gt;
  #include &lt;QtGui/QHeaderView&gt;
  #include &lt;QtGui/QMainWindow&gt;
  #include &lt;QtGui/QMenuBar&gt;
  #include &lt;QtGui/QStatusBar&gt;
  #include &lt;QtGui/QWidget&gt;
  
  QT_BEGIN_NAMESPACE
  
  class Ui_UI_main
  {
  public:
      QWidget *centralwidget;
      QGroupBox *groupBox;
      QMenuBar *menubar;
      QStatusBar *statusbar;
  
      void setupUi(QMainWindow *UI_main)
      {
          if (UI_main-&gt;objectName().isEmpty())
              UI_main-&gt;setObjectName(QString::fromUtf8("UI_main"));
          UI_main-&gt;resize(800, 600);
          centralwidget = new QWidget(UI_main);
          centralwidget-&gt;setObjectName(QString::fromUtf8("centralwidget"));
          groupBox = new QGroupBox(centralwidget);
          groupBox-&gt;setObjectName(QString::fromUtf8("groupBox"));
          groupBox-&gt;setGeometry(QRect(300, 210, 120, 80));
          UI_main-&gt;setCentralWidget(centralwidget);
          menubar = new QMenuBar(UI_main);
          menubar-&gt;setObjectName(QString::fromUtf8("menubar"));
          menubar-&gt;setGeometry(QRect(0, 0, 800, 21));
          UI_main-&gt;setMenuBar(menubar);
          statusbar = new QStatusBar(UI_main);
          statusbar-&gt;setObjectName(QString::fromUtf8("statusbar"));
          UI_main-&gt;setStatusBar(statusbar);
  
          retranslateUi(UI_main);
  
          QMetaObject::connectSlotsByName(UI_main);
      } // setupUi
  
      void retranslateUi(QMainWindow *UI_main)
      {
          UI_main-&gt;setWindowTitle(QApplication::translate("UI_main", "UI_main", 0, QApplication::UnicodeUTF8));
          groupBox-&gt;setTitle(QApplication::translate("UI_main", "GroupBox", 0, QApplication::UnicodeUTF8));
      } // retranslateUi
  
  };
  
  namespace Ui {
      class UI_main: public Ui_UI_main {};
  } // namespace Ui
  
  QT_END_NAMESPACE
  
  #endif // UI_UI_MAIN_H
  </code></pre>
  
  <p>UI_main.cpp :</p>
  
  <pre><code>#include "UI_main.h"
  
  UI_main::UI_main() {
      widget.setupUi(this);
  }
  
  UI_main::~UI_main() {
  }
  </code></pre>
  
  <p>UI_main.ui only contains a group box created with QTDesigner.</p>
  
  <p>The error msg :</p>
  
  <blockquote>
    <p>RUN FAILED (exit value -1 073 741 819, total time: 2s)</p>
  </blockquote>
  
  <p>I tried running it with Windows console and with compatibility mode W7 and XP with the same result.</p>
  
  <p>Any Ideas ?
  Thank by advance.</p>