Использование SendScintilla в pyqt5 QScintilla
Я ищу строку в окне qscintilla
import sys
from PyQt5 import Qsci
from PyQt5.QtWidgets import *
app = QApplication(sys.argv)
window = Qsci.QsciScintilla()
window.show()
text = "Hello world"
window.setText(text)
scintilla = window.SendScintilla
scintilla(window.SCI_TARGETWHOLEDOCUMENT)
pos = scintilla(window.SCI_SEARCHINTARGET,len("world"),"world")
print(pos)
app.exec_()
я пытаюсь найти "мир" в текстовой строке, используя Sendscintilla, когда я запускаю этот код, он показывает эту ошибку
pos = scintilla(window.SCI_SEARCHINTARGET,len("world"),"world")
TypeError: arguments did not match any overloaded call:
SendScintilla(self, int, wParam: int = 0, lParam: int = 0): argument 3 has unexpected type 'str'
SendScintilla(self, int, int, sip.voidptr): argument 3 has unexpected type 'str'
SendScintilla(self, int, int, bytes): argument 3 has unexpected type 'str'
SendScintilla(self, int, bytes): argument 2 has unexpected type 'int'
SendScintilla(self, int, bytes, bytes): argument 2 has unexpected type 'int'
SendScintilla(self, int, int): too many arguments
SendScintilla(self, int, int, int, bytes): argument 3 has unexpected type 'str'
SendScintilla(self, int, int, Union[QColor, Qt.GlobalColor]): argument 3 has unexpected type 'str'
SendScintilla(self, int, Union[QColor, Qt.GlobalColor]): argument 2 has unexpected type 'int'
SendScintilla(self, int, int, QPainter, QRect, int, int): argument 3 has unexpected type 'str'
SendScintilla(self, int, int, QPixmap): argument 3 has unexpected type 'str'
SendScintilla(self, int, int, QImage): argument 3 has unexpected type 'str'