126 @rtype QUrl |
126 @rtype QUrl |
127 """ |
127 """ |
128 link = QUrl() |
128 link = QUrl() |
129 from .HelpTopicDialog import HelpTopicDialog |
129 from .HelpTopicDialog import HelpTopicDialog |
130 dlg = HelpTopicDialog(self, keyword, links) |
130 dlg = HelpTopicDialog(self, keyword, links) |
131 if dlg.exec_() == QDialog.Accepted: |
131 if dlg.exec() == QDialog.Accepted: |
132 link = dlg.link() |
132 link = dlg.link() |
133 return link |
133 return link |
134 |
134 |
135 def __filterIndices(self, indexFilter): |
135 def __filterIndices(self, indexFilter): |
136 """ |
136 """ |
208 newBackgroundTab = menu.addAction( |
208 newBackgroundTab = menu.addAction( |
209 self.tr("Open Link in Background Tab")) |
209 self.tr("Open Link in Background Tab")) |
210 newWindow = menu.addAction(self.tr("Open Link in New Window")) |
210 newWindow = menu.addAction(self.tr("Open Link in New Window")) |
211 menu.move(self.__index.mapToGlobal(pos)) |
211 menu.move(self.__index.mapToGlobal(pos)) |
212 |
212 |
213 act = menu.exec_() |
213 act = menu.exec() |
214 model = self.__index.model() |
214 model = self.__index.model() |
215 if model is not None: |
215 if model is not None: |
216 keyword = model.data(idx, Qt.DisplayRole) |
216 keyword = model.data(idx, Qt.DisplayRole) |
217 links = model.linksForKeyword(keyword) |
217 links = model.linksForKeyword(keyword) |
218 if len(links) == 1: |
218 if len(links) == 1: |