title: Qt Events after a long routine freezes my application for a while
body: <p>So, I have a single-threaded application which loads data from a set of file:</p>
  
  <pre><code>QStringList qFiles = QFileDialog::getOpenFileNames(
      this,
      "Choose Image Files",
      "",
      "Dicom Files(*.dcm);;All Files(*)"
  );
  </code></pre>
  
  <p>After that I invoke a library which will parse the set of files, since the library invokes OpenGL functions I may not create a new thread for this processing. 
  Once this processing is done I noticed my application froze for a while.</p>
  
  <p>Using GDB I noticed my Qt Application buffered a lot of Events while the library processed the set of files and then it is processing these events.</p>
  
  <p>I may not invoke QApplication::instance()->processEvents() inside the libary, because it doesnt know Qt(project decision).</p>
  
  <p>Is there way to discard these events? Or is there any other solution to keep my application from freezing?</p>