WebBrowser/WebBrowserPage.py

branch
QtWebEngine
changeset 4884
6983af705a7f
parent 4864
00a215a67f25
child 4886
b56735d36159
equal deleted inserted replaced
4881:c269212cceac 4884:6983af705a7f
89 self.authenticationRequired.connect( 89 self.authenticationRequired.connect(
90 WebBrowserWindow.networkManager().authentication) 90 WebBrowserWindow.networkManager().authentication)
91 91
92 self.proxyAuthenticationRequired.connect( 92 self.proxyAuthenticationRequired.connect(
93 WebBrowserWindow.networkManager().proxyAuthentication) 93 WebBrowserWindow.networkManager().proxyAuthentication)
94
95 self.fullScreenRequested.connect(self.__fullScreenRequested)
94 96
95 def acceptNavigationRequest(self, url, type_, isMainFrame): 97 def acceptNavigationRequest(self, url, type_, isMainFrame):
96 """ 98 """
97 Public method to determine, if a request may be accepted. 99 Public method to determine, if a request may be accepted.
98 100
617 @rtype bool 619 @rtype bool
618 """ 620 """
619 return WebBrowserWindow.networkManager().certificateError( 621 return WebBrowserWindow.networkManager().certificateError(
620 error, self.view()) 622 error, self.view())
621 623
624 def __fullScreenRequested(self, request):
625 """
626 Private slot handling a full screen request.
627 """
628 self.view().requestFullScreen(request.toggleOn())
629
630 accepted = request.toggleOn() == self.view().isFullScreen()
631
632 if accepted:
633 request.accept()
634 else:
635 request.reject()
636
622 ############################################## 637 ##############################################
623 ## Methods below deal with JavaScript messages 638 ## Methods below deal with JavaScript messages
624 ############################################## 639 ##############################################
625 640
626 def javaScriptConsoleMessage(self, level, message, lineNumber, sourceId): 641 def javaScriptConsoleMessage(self, level, message, lineNumber, sourceId):

eric ide

mercurial