title: Calling a C++ function from Qml asynchronously or in a new thread
body: <p>I completed my entire project on building an application that basically fetches sql query result based on some user input combination in the GUI and I believe that there is some performance issue when calling a <code>Q_INVOKABLE</code> function in  C++ code which performs some computation to produce the query and also run the query and return the result, so I wanted to know if there is a way to run that function in a separate thread from qml. 
  The skeleton is somewhat like this:</p>
  
  <p>Result.h</p>
  
  <pre><code>class Result{
  public:
     Q_INVOKABLE void on_submit_button_clicked(); 
  }
  </code></pre>
  
  <p>Result.cpp</p>
  
  <pre><code>Result::on_submit_button_clicked()
  {
          /*Code that prepare the query*/
  
          /*Code that runs the query using a Qthread*/
  }
  </code></pre>
  
  <p>main.qml</p>
  
  <pre><code>ApplicationWindow
  {
      id:appwindow
  
  
      /*Other parts of the GUI*/
      Button{
          id:submitButton
          onClicked:{
                result_object.on_submit_button_clicked() //how to run this function in a new thread ? 
                /*code to load my table view columns*/
          }
      }
  }
  </code></pre>