WebBrowser/WebBrowserView.py

changeset 5526
11337e4fba52
parent 5491
a9d9f294de64
child 5530
93f95c4b3153
equal deleted inserted replaced
5525:1771a7f9065c 5526:11337e4fba52
500 @param menu reference to the menu to be populated 500 @param menu reference to the menu to be populated
501 @type QMenu 501 @type QMenu
502 @param hitTest reference to the hit test object 502 @param hitTest reference to the hit test object
503 @type WebHitTestResult 503 @type WebHitTestResult
504 """ 504 """
505 # TODO: Qt 5.8 - add support for spell checking
505 if not hitTest.linkUrl().isEmpty() and \ 506 if not hitTest.linkUrl().isEmpty() and \
506 hitTest.linkUrl().scheme() != "javascript": 507 hitTest.linkUrl().scheme() != "javascript":
507 self.__createLinkContextMenu(menu, hitTest) 508 self.__createLinkContextMenu(menu, hitTest)
508 509
509 if not hitTest.imageUrl().isEmpty(): 510 if not hitTest.imageUrl().isEmpty():
1337 @return flag indicating that the event should be filtered out 1338 @return flag indicating that the event should be filtered out
1338 @rtype bool 1339 @rtype bool
1339 """ 1340 """
1340 # find the render widget receiving events for the web page 1341 # find the render widget receiving events for the web page
1341 if obj is self and evt.type() == QEvent.ChildAdded: 1342 if obj is self and evt.type() == QEvent.ChildAdded:
1343 # TODO: Qt 5.8 - check, if this still works on 5.8 (see Qupzilla)
1342 child = evt.child() 1344 child = evt.child()
1343 if child and child.inherits( 1345 if child and child.inherits(
1344 "QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget"): 1346 "QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget"):
1345 self.__rwhvqt = child 1347 self.__rwhvqt = child
1346 self.grabGesture(Qt.PinchGesture) 1348 self.grabGesture(Qt.PinchGesture)
1611 """ 1613 """
1612 url = self.url() 1614 url = self.url()
1613 if url.isEmpty(): 1615 if url.isEmpty():
1614 return 1616 return
1615 1617
1618 # TODO: Qt 5.8 - use QWebEnginePage.save()
1616 self.triggerPageAction(QWebEnginePage.SavePage) 1619 self.triggerPageAction(QWebEnginePage.SavePage)
1617 1620
1618 ########################################################################### 1621 ###########################################################################
1619 ## Miscellaneous methods below 1622 ## Miscellaneous methods below
1620 ########################################################################### 1623 ###########################################################################

eric ide

mercurial