Helpviewer/UrlBar/UrlBar.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2432
b1a2f9054b28
child 2599
2373006616da
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the URL bar widget. 7 Module implementing the URL bar widget.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try:
12 str = unicode
13 except (NameError):
14 pass
9 15
10 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl, QDateTime, qVersion 16 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl, QDateTime, qVersion
11 from PyQt4.QtGui import QColor, QPalette, QLinearGradient, QIcon, QDialog, QApplication 17 from PyQt4.QtGui import QColor, QPalette, QLinearGradient, QIcon, QDialog, QApplication
12 try: 18 try:
13 from PyQt4.QtNetwork import QSslCertificate # __IGNORE_EXCEPTION__ 19 from PyQt4.QtNetwork import QSslCertificate # __IGNORE_EXCEPTION__
338 if evt.button() == Qt.XButton1: 344 if evt.button() == Qt.XButton1:
339 self.__mw.currentBrowser().pageAction(QWebPage.Back).trigger() 345 self.__mw.currentBrowser().pageAction(QWebPage.Back).trigger()
340 elif evt.button() == Qt.XButton2: 346 elif evt.button() == Qt.XButton2:
341 self.__mw.currentBrowser().pageAction(QWebPage.Forward).trigger() 347 self.__mw.currentBrowser().pageAction(QWebPage.Forward).trigger()
342 else: 348 else:
343 super().mousePressEvent(evt) 349 super(UrlBar, self).mousePressEvent(evt)
344 350
345 def mouseDoubleClickEvent(self, evt): 351 def mouseDoubleClickEvent(self, evt):
346 """ 352 """
347 Protected method to handle mouse double click events. 353 Protected method to handle mouse double click events.
348 354

eric ide

mercurial