title: QT : How to determine if the event processor is busy
body: <p>In my current Qt application I am attempting to shut it down using</p>
  
  <pre><code>QCoreApplication::quit();
  </code></pre>
  
  <p>Now it takes more than a minute for the application to shutdown. I believe this is because the event processor of the main form is busy. My question is : Is there a way for me to determine what the cause of this might be. Here are somethings that I suspect</p>
  
  <p>1-Queued Connections.
  I have a lot of queued connections. Maybe some of those connections dont get processed</p>
  
  <p>2-Event Loop.
  May be the event loop is busy doing something that I dont know (expect) </p>
  
  <p>Any suggestions on what I could do to check why the app takes so long to close ?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I tried <code>QCoreApplication::hasPendingEvents()</code> and that returns true</p>