129 """ |
129 """ |
130 if Preferences.getWebBrowser("ShowPreview"): |
130 if Preferences.getWebBrowser("ShowPreview"): |
131 # If leave tabwidget then hide previous tab preview |
131 # If leave tabwidget then hide previous tab preview |
132 self.__hidePreview() |
132 self.__hidePreview() |
133 |
133 |
134 super(WebBrowserTabBar, self).leaveEvent(evt) |
134 super().leaveEvent(evt) |
135 |
135 |
136 def mousePressEvent(self, evt): |
136 def mousePressEvent(self, evt): |
137 """ |
137 """ |
138 Protected method to handle mouse press events. |
138 Protected method to handle mouse press events. |
139 |
139 |
140 @param evt reference to the mouse press event (QMouseEvent) |
140 @param evt reference to the mouse press event (QMouseEvent) |
141 """ |
141 """ |
142 if Preferences.getWebBrowser("ShowPreview"): |
142 if Preferences.getWebBrowser("ShowPreview"): |
143 self.__hidePreview() |
143 self.__hidePreview() |
144 |
144 |
145 super(WebBrowserTabBar, self).mousePressEvent(evt) |
145 super().mousePressEvent(evt) |
146 |
146 |
147 def event(self, evt): |
147 def event(self, evt): |
148 """ |
148 """ |
149 Public method to handle event. |
149 Public method to handle event. |
150 |
150 |
160 ): |
160 ): |
161 # suppress tool tips if we are showing previews |
161 # suppress tool tips if we are showing previews |
162 evt.setAccepted(True) |
162 evt.setAccepted(True) |
163 return True |
163 return True |
164 |
164 |
165 return super(WebBrowserTabBar, self).event(evt) |
165 return super().event(evt) |
166 |
166 |
167 def tabRemoved(self, index): |
167 def tabRemoved(self, index): |
168 """ |
168 """ |
169 Public slot to handle the removal of a tab. |
169 Public slot to handle the removal of a tab. |
170 |
170 |