title: MessageDialog freezes when created from Slot qt
body: <p>I am trying to show message dialog from worker thread. Using slots and signals is standard way of communicating with/calling QML objects, but when dialog appears it's button is unclickable/not responding.</p>
  
  <p>main.cpp</p>
  
  <pre><code>tester* test = new tester;
  QtConcurrent::run(test,tester::testFunction);
  </code></pre>
  
  <p>tester.cpp</p>
  
  <pre><code>#include "tester.h"
  #include &lt;QQmlEngine&gt;
  #include &lt;QQmlComponent&gt;
  
  tester::tester(QObject *parent) : QObject(parent) {
      QObject::connect(this,SIGNAL(show()),this,SLOT(showSlot()));
  }
  void tester::testFunction() {
      emit show();
  }
  void tester::showSlot(){
      QQmlEngine engine;
      QQmlComponent component(&amp;engine, QUrl(QLatin1String("qrc:/BlockingDialog.qml")));
      QObject *object = component.create();
      QMetaObject::invokeMethod(object, "open");
  }
  </code></pre>
  
  <p>tester.h</p>
  
  <pre><code>#include &lt;QObject&gt;
  
  class tester : public QObject{
      Q_OBJECT
  public:
      explicit tester(QObject *parent = 0);
      void testFunction();
  signals:
      void show();
  public slots:
      void showSlot();
  };
  </code></pre>
  
  <p>BlockingDialog.qml</p>
  
  <pre><code>import QtQuick 2.7
  import QtQuick.Dialogs 1.2
  
  MessageDialog {
      id:dialog    
  }
  </code></pre>