pyqt6 FindFlags(0) -> FindFlag(0)

This commit is contained in:
Kovid Goyal 2021-11-20 10:29:11 +05:30
parent eb1e096c92
commit 5363c147ba
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -209,7 +209,7 @@ class ItemEdit(QWidget):
def find(self, forwards=True):
text = str(self.search_text.text()).strip()
flags = QWebEnginePage.FindFlags(0) if forwards else QWebEnginePage.FindFlag.FindBackward
flags = QWebEnginePage.FindFlag(0) if forwards else QWebEnginePage.FindFlag.FindBackward
self.find_data = text, flags, forwards
self.view.findText(text, flags, self.find_callback)

View File

@ -594,7 +594,7 @@ class Preview(QWidget):
def find(self, direction):
text = str(self.search.text())
self.view._page.findText(text, (
QWebEnginePage.FindFlag.FindBackward if direction == 'prev' else QWebEnginePage.FindFlags(0)))
QWebEnginePage.FindFlag.FindBackward if direction == 'prev' else QWebEnginePage.FindFlag(0)))
def find_next(self):
self.find('next')