title: Is there any way to call synchronously the method 'toHtml' which is QWebEnginePage's object?
body: <p>I'm trying to get html code from the QWebEnginePage object. According to Qt reference, QWebEnginePage object's 'toHtml' is asynchronous method as below.</p>
  <blockquote>
  <p><strong>Asynchronous</strong> method to retrieve the page's content as HTML, enclosed in HTML and BODY tags. Upon successful completion, resultCallback is called with the page's content.</p>
  </blockquote>
  <p>so I tried to find out how call this method synchronously.</p>
  <p>the result what i want to get is below.</p>
  <pre><code>class MainWindow(QWidget):
    html = None
    ...
    ...
    def store_html(self, data):
      self.html = data
  
    def get_html(self):
      current_page = self.web_view.page()
      current_page.toHtml(self.store_html)
      # I want to wait until the 'store_html' method is finished
      # but the 'toHtml' is called asynchronously, return None when try to return self.html value like below.
      return self.html 
    ...
    ...
  </code></pre>