title: how to use objects of the widgets in QT
body: <p>In my application I'm having 2 widgets named as <code>widget</code> and <code>form</code>. But if i try to create a pointer object of widget <code>widget</code> in widget <code>form</code> header file , it is giving the error like "Form does not name a type". Refer my used code below:</p>
  
  <p><strong>main.cpp</strong> </p>
  
  <pre><code>#include &lt;QtGui/QApplication&gt;
  #include "widget.h"
  #include "form.h"
  int main(int argc, char *argv[])
  {
    QApplication a(argc, argv);
    Widget *w = new Widget();
     w-&gt;show();
    return a.exec();
   }
  </code></pre>
  
  <p><strong>widget.cpp</strong></p>
  
  <pre><code>#include "widget.h"
  Widget::Widget(QWidget *parent) :QWidget(parent)
  {
    setupUi(this);
  }
  </code></pre>
  
  <p><strong>widget.h</strong></p>
  
  <pre><code> #ifndef WIDGET_H
   #define WIDGET_H
  
   #include "ui_widget.h"
   #include "form.h"
   class Widget : public QWidget, private Ui::Widget
   {
      Q_OBJECT
      public:
          explicit Widget(QWidget *parent = 0);
          Form *f ;//i try to create pointer object for Form
   };
   #endif // WIDGET_H
  </code></pre>
  
  <p><strong>form.cpp</strong></p>
  
  <pre><code> #include "form.h"
   #include "widget.h"
  
   Form::Form(QWidget *parent) :QWidget(parent)
   {
     setupUi(this);
   }
  </code></pre>
  
  <p><strong>form.h</strong></p>
  
  <pre><code>#ifndef FORM_H
  #define FORM_H
  
  #include "ui_form.h"
  #include "widget.h"
  class Form : public QWidget, private Ui::Form
  {
    Q_OBJECT
    public:
         explicit Form(QWidget *parent = 0);
  };
  </code></pre>
  
  <p>What I'm doing wrong?</p>