title: QDialog::accept quits Main Application
body: <p>I have a <code>ClientSocket</code> Class which is a <code>TcpSocket</code> in a certain state of conversation I need to ask the user to enter a Communication password. So I've created a Dialog <code>DG::ChallangeDialog</code> . in <code>DG::ChallangeDialog</code>s ctor I've </p>
  
  <pre><code>ui-&gt;setupUi(this);
  QPushButton* okButton = ui-&gt;buttonBox-&gt;button(QDialogButtonBox::Ok);
  if(okButton != 0x0){
      okButton-&gt;setText("Challange");
  }
  QObject::connect(this, SIGNAL(accepted()), this, SLOT(acceptedSlot()));
  </code></pre>
  
  <p><code>acceptedSlot</code> again emits a signal <code>challanged(QString)</code></p>
  
  <pre><code>void ChallangeDialog::acceptedSlot(){
      QString text = ui-&gt;passBox-&gt;text();
      emit challanged(text);
  }
  </code></pre>
  
  <p>in <code>ClientSocket</code> I do</p>
  
  <pre><code>    case Hallo:{
              if(m-&gt;message().startsWith("welcome")){
                  DG::ChallangeDialog* dlg = new DG::ChallangeDialog;
                  dlg-&gt;setModal(true);
                  connect(dlg, SIGNAL(challanged(QString)), this, SLOT(challanged(QString)));
                  dlg-&gt;exec();
                  /*
                  DG::MessagePacket* res = new DG::MessagePacket((int)Hallo);
                  res-&gt;setMessage("challange");
                  send(res);
                  state = Challange;
                  */
              }
          }break;
  </code></pre>
  
  <p>In <code>ClientSocket::challange</code> <strong>slot</strong> I send a Message <em>challange</em> (text) over the socket and store the password.
  <hr />
  and I expect the Dialog to hide there and the normal socket conversation to continue. and after the Dialog is accepted or rejected the main application quits (It quits it doesn't crash). Why ?</p>
  
  <ul>
  <li>My Application has no Other Widgets. I just works like an QCoreApplication. But still I've used QApplication cause I've some GUI Needs.</li>
  </ul>