eric7/WebBrowser/QtHelp/HelpSearchWidget.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8685
b0669ce1066d
equal deleted inserted replaced
8316:0c7a44af84bc 8318:962bce857696
5 5
6 """ 6 """
7 Module implementing a window for showing the QtHelp index. 7 Module implementing a window for showing the QtHelp index.
8 """ 8 """
9 9
10 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QUrl 10 from PyQt6.QtCore import pyqtSignal, pyqtSlot, Qt, QUrl
11 from PyQt5.QtWidgets import ( 11 from PyQt6.QtWidgets import (
12 QWidget, QVBoxLayout, QTextBrowser, QApplication, QMenu 12 QWidget, QVBoxLayout, QTextBrowser, QApplication, QMenu
13 ) 13 )
14 14
15 15
16 class HelpSearchWidget(QWidget): 16 class HelpSearchWidget(QWidget):
64 64
65 def __search(self): 65 def __search(self):
66 """ 66 """
67 Private slot to perform a search of the database. 67 Private slot to perform a search of the database.
68 """ 68 """
69 query = self.__query.query() 69 query = self.__query.searchInput()
70 self.__engine.search(query) 70 self.__engine.search(query)
71 71
72 def __searchingStarted(self): 72 def __searchingStarted(self):
73 """ 73 """
74 Private slot to handle the start of a search. 74 Private slot to handle the start of a search.
93 """ 93 """
94 if not url.isEmpty() and url.isValid(): 94 if not url.isEmpty() and url.isValid():
95 buttons = QApplication.mouseButtons() 95 buttons = QApplication.mouseButtons()
96 modifiers = QApplication.keyboardModifiers() 96 modifiers = QApplication.keyboardModifiers()
97 97
98 if buttons & Qt.MouseButton.MidButton: 98 if buttons & Qt.MouseButton.MiddleButton:
99 self.newTab.emit(url) 99 self.newTab.emit(url)
100 else: 100 else:
101 if ( 101 if (
102 modifiers & ( 102 modifiers & (
103 Qt.KeyboardModifier.ControlModifier | 103 Qt.KeyboardModifier.ControlModifier |

eric ide

mercurial