-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a question about the cursor in the qscintilla, not an issue #45
Comments
Hi @Mr-ZBin , Funny you brought this up, as I also had the idea to make a custom autocompletion popup. I have posted a question on the mailing list and will poke around the source a bit more. Will report back when something comes up. |
I have just gotten a reply on the mailing list:
Basically use: x = editor.SendScintilla(QsciScintilla.SCI_POINTXFROMPOSITION, editor.positionFromLineIndex(editor.getCursorPosition()))
y = editor.SendScintilla(QsciScintilla.SCI_POINTYFROMPOSITION, editor.positionFromLineIndex(editor.getCursorPosition())) I will try it later. |
@Mr-ZBin x = editor.SendScintilla(QsciScintilla.SCI_POINTXFROMPOSITION, 0, editor.positionFromLineIndex(*editor.getCursorPosition()))
y = editor.SendScintilla(QsciScintilla.SCI_POINTYFROMPOSITION, 0, editor.positionFromLineIndex(*editor.getCursorPosition())) |
Hi matkhui, |
Hi matkuki,
I have a question about how to get the cursor position in the screen? The statement self.cursor() returns the mouse position, and also self.getCursorPosition() only return the line and col number. But in the QPlainTextEdit, we can get the cursor position in the screen by using self.cursorRect(). I want use this position to create the auto complete panel instead of default completion in the qscintilla.
I have researched in "https://www.scintilla.org/ScintillaDoc.html" and looked it into the google for many days, but still not find the solution.
Do you know any solution about this?
Thank you very much,
Bin
The text was updated successfully, but these errors were encountered: