WebBrowser/WebBrowserPage.py

branch
maintenance
changeset 6206
a02b03b7bfec
parent 6176
8927e74527bc
child 6233
a64b986abb54
equal deleted inserted replaced
6205:ad8ed15f90e5 6206:a02b03b7bfec
84 self.urlChanged.connect(self.__urlChanged) 84 self.urlChanged.connect(self.__urlChanged)
85 85
86 self.__printer = None 86 self.__printer = None
87 self.__badSite = False 87 self.__badSite = False
88 88
89 if qVersionTuple()[0:2] == (5, 10):
90 self.loadProgress.connect(self.__loadProgressSlot)
91
92 # Workaround for changing webchannel world inside 89 # Workaround for changing webchannel world inside
93 # acceptNavigationRequest not working 90 # acceptNavigationRequest not working
94 self.__channelUrl = QUrl() 91 self.__channelUrl = QUrl()
95 self.__channelWorldId = -1 92 self.__channelWorldId = -1
96 self.__setupChannelTimer = QTimer(self) 93 self.__setupChannelTimer = QTimer(self)
102 def __setupChannelTimeout(self): 99 def __setupChannelTimeout(self):
103 """ 100 """
104 Private slot to initiate the setup of the web channel. 101 Private slot to initiate the setup of the web channel.
105 """ 102 """
106 self.__setupWebChannelForUrl(self.__channelUrl) 103 self.__setupWebChannelForUrl(self.__channelUrl)
107
108 @pyqtSlot(int)
109 def __loadProgressSlot(self, progress):
110 """
111 Private slot to implement a workaround for the loadFinished signal
112 not working properly in Qt 5.10.0.
113
114 @param progress load progress in percent
115 @type int
116 """
117 if progress == 100:
118 self.loadFinished.emit(True)
119 104
120 def acceptNavigationRequest(self, url, type_, isMainFrame): 105 def acceptNavigationRequest(self, url, type_, isMainFrame):
121 """ 106 """
122 Public method to determine, if a request may be accepted. 107 Public method to determine, if a request may be accepted.
123 108

eric ide

mercurial