title: Qt doesn't display child widget
body: <p>How can i access ui files of children of a class. Lets say MainWindow class has twoa child dialog. I want to access LINEEDIT of dialog so that i can take text from there. Similarly how can i access ui files of parent inside child class in QT. Note: I havn't inherited any thing from Parent class. 
  I have writen the following code, in order to display a dialog but it won't show!</p>
  
  <pre><code>void MainWindow::displaydialog()
  {
      ItemDialog dialog= new ItemDialog(this);
  
      dialog-&gt;show(); // it is not displaying the dialog
  }
  </code></pre>
  
  <p>and how can i access the ui widgets like check whether ListWidget item has been selected or not. </p>
  
  <p>Here is the code of itemdialog, </p>
  
  <pre><code>#include "itemdialog.h"
  #include "ui_itemdialog.h"
  #include "mainwindow.h"
  
  ItemDialog::ItemDialog(QWidget *parent) :
      QDialog(parent),
      ui(new Ui::ItemDialog)
  {
      ui-&gt;setupUi(this);
      setWindowTitle("Status Dialog");
  setFixedSize(QWidget::sizeHint());
  }
  
  ItemDialog::~ItemDialog()
  {
  delete ui;
  }
  
   void ItemDialog::on_pushButton_clicked()
  {
      MainWindow obj;
      obj.okbuttonclicked(ui-&gt;lineEdit-&gt;text());
  }
  </code></pre>