title: Qt : how to implement QDialog StatusBar
body: <p>I have <code>QDialog</code> that is heavily designed with <code>QDesigner</code> , I saw on the web that I could add <code>QStatusBar</code> with code like this :  </p>
  
  <pre><code>#include &lt;QDialog&gt;
  #include &lt;QStatusBar&gt;
  #include &lt;QLayout&gt;
  #include &lt;QApplication&gt;
  #include &lt;QTextEdit&gt;
  #include &lt;QStatusTipEvent&gt;
  
  class Dialog : public QDialog {
  public:
  Dialog() : QDialog(){
  QLayout *l = new QVBoxLayout(this);
  QTextEdit *te = new QTextEdit;
  te-&gt;setStatusTip("XXX");
  l-&gt;addWidget(te);
  bar = new QStatusBar;
  l-&gt;addWidget(bar);
  l-&gt;setMargin(0);
  l-&gt;setSpacing(0);
  }
  private:
  QStatusBar *bar;
  protected:
  bool event(QEvent *e){
  if(e-&gt;type()==QEvent::StatusTip){
  QStatusTipEvent *ev = (QStatusTipEvent*)e;
  bar-&gt;showMessage(ev-&gt;tip());
  return true;
  }
  return QDialog::event(e);
  }
  };
  
  int main(int argc, char **argv){
  QApplication app(argc, argv);
  Dialog dlg;
  return dlg.exec();
  }
  </code></pre>
  
  <p>Its not even working in my case .. maybe the <code>QDialog</code> is already have few layets that holds widget.</p>
  
  <p>My question is can I some how use palceholder in the <code>QDesigner</code> or somehow promote widget that place hold the <code>QStatusbar</code> class? I don’t know …</p>
  
  <p>What can I do in such case? can I implement new <code>QStatusbar</code>?</p>
  
  <p>Thanks   </p>