def METHOD_NAME(self, parent):
    """Finishes initializing the editor by creating the underlying toolkit
    widget.
    """
    self.control = WebView()
    self.control.setSizePolicy(
        QtGui.QSizePolicy.Policy.Expanding, QtGui.QSizePolicy.Policy.Expanding
    )
    if self.factory.open_externally:
        if HAS_WEB_VIEW:
            page = self.control.page()
            if hasattr(page, 'setLinkDelegationPolicy'):
                # QtWebKit
                page.setLinkDelegationPolicy(
                    QtWebKit.QWebPage.DelegateAllLinks
                )
                page.linkClicked.connect(self._link_clicked)
            else:
                # QtWebEngine pretending to be QtWebKit
                # We need the subclass defined above instead of the
                # regular web page so that links are opened externally
                page = ExternallyOpeningWebPage(self.control)
                self.control.setPage(page)
        else:
            # take over handling clicks on links
            self.control.setOpenLinks(False)
            self.control.anchorClicked.connect(self._link_clicked)
    self.base_url = self.factory.base_url
    self.sync_value(self.factory.base_url_name, "base_url", "from")