99 event.type() == QEvent.MouseButtonRelease: |
99 event.type() == QEvent.MouseButtonRelease: |
100 if self.__tocWidget.indexAt(event.pos()).isValid() and \ |
100 if self.__tocWidget.indexAt(event.pos()).isValid() and \ |
101 event.button() == Qt.LeftButton: |
101 event.button() == Qt.LeftButton: |
102 self.itemClicked(self.__tocWidget.currentIndex()) |
102 self.itemClicked(self.__tocWidget.currentIndex()) |
103 elif self.__tocWidget.indexAt(event.pos()).isValid() and \ |
103 elif self.__tocWidget.indexAt(event.pos()).isValid() and \ |
104 event.button() == Qt.MidButton: |
104 event.button() == Qt.MidButton: |
105 model = self.__tocWidget.model() |
105 model = self.__tocWidget.model() |
106 itm = model.contentItemAt(self.__tocWidget.currentIndex()) |
106 itm = model.contentItemAt(self.__tocWidget.currentIndex()) |
107 self.__mw.newTab(itm.url()) |
107 self.__mw.newTab(itm.url()) |
108 |
108 |
109 return QWidget.eventFilter(self, watched, event) |
109 return QWidget.eventFilter(self, watched, event) |