def __init__(self, parent): QWebEngineView.__init__(self, parent) self.zoom_factor = 1. self.zoom_out_action = create_action(self, _("Zoom out"), icon=ima.icon('zoom_out'), triggered=self.zoom_out) self.zoom_in_action = create_action(self, _("Zoom in"), icon=ima.icon('zoom_in'), triggered=self.zoom_in)
def __init__(self, parent): QWebEngineView.__init__(self, parent) self.zoom_factor = 1. self.zoom_out_action = create_action(self, _("Zoom out"), icon=ima.icon('zoom_out'), triggered=self.zoom_out) self.zoom_in_action = create_action(self, _("Zoom in"), icon=ima.icon('zoom_in'), triggered=self.zoom_in) if WEBENGINE: web_page = WebPage(self) self.setPage(web_page)
def __init__(self, parent, handle_links=True): QWebEngineView.__init__(self, parent) self.zoom_factor = 1. self.zoom_out_action = create_action(self, _("Zoom out"), icon=ima.icon('zoom_out'), triggered=self.zoom_out) self.zoom_in_action = create_action(self, _("Zoom in"), icon=ima.icon('zoom_in'), triggered=self.zoom_in) if WEBENGINE: if handle_links: web_page = WebPage(self) else: web_page = QWebEnginePage(self) self.setPage(web_page) self.source_text = ''
def __init__(self, parent, handle_links=True, class_parent=None): class_parent = parent if class_parent is None else class_parent if PYQT5: super().__init__(parent, class_parent=class_parent) else: QWebEngineView.__init__(self, parent) SpyderWidgetMixin.__init__(self, class_parent=class_parent) self.zoom_factor = 1. self.context_menu = None if WEBENGINE: if handle_links: web_page = WebPage(self) else: web_page = QWebEnginePage(self) self.setPage(web_page) self.source_text = ''