title: Qt slot and minidump
body: <p>We have a small program written in <code>Qt</code> on windows, we use <code>minidump</code> to help us catch client side crash.
  Our goal is to at least see the call stack when it crashes.</p>
  <pre><code>...
  SetUnhandledExceptionFilter(unhandled_handler);  // write minidump in unhandled_handler
  ...
  
  </code></pre>
  <p>The problem is it doesn't always create minidump after a crash, sometimes the error log shows:</p>
  <pre><code>Warning: Qt has caught an exception thrown from an event handler. Throwing
  exceptions from an event handler is not supported in Qt. You must
  reimplement QApplication::notify() and catch all exceptions there.
  </code></pre>
  <p>Does qt catch the exception and stop my app creating minidump?</p>
  <p>There are also times we get useless minidump result, it's Call Stack is:</p>
  <pre><code>[Frames may be missing, no binary loaded for KERNELBASE.dll]
  KERNELBASE.dll!00007ffd05bd4fd9()   Unknown
  </code></pre>
  <p>With output</p>
  <pre><code>Unhandled exception at 0x00007FFD05BD4FD9 in SofterClear_1_22_0_220822_141118_061915.dmp: Microsoft C++ exception: std::
  </code></pre>
  <p>According to <a href="https://doc.qt.io/qt-6/exceptionsafety.html#exceptions-in-client-code" rel="nofollow noreferrer">this</a> :</p>
  <pre><code>Throwing an exception from a slot invoked by Qt's signal-slot connection mechanism is considered undefined behaviour, unless it is handled within the slot
  </code></pre>
  <p>I have tried to override <code>QApplication::notify</code> as</p>
  <pre><code>bool AlignApplication::notify(QObject * receiver, QEvent * event)
  {
      bool done = true;
      try {
          done = QApplication:
      }
      catch (const std::exception&amp; ex) {
          throw ex; // I have also tried to create minidump here, but it's empty and useless.
      }
      catch (...) {
          throw &quot;unknown error&quot;;
      }
      return done;
  
  </code></pre>
  <p>But it doesn't work.</p>
  <p>Is it possible to create minidump with full call stack after an exception happen in Qt slot ?</p>