A few months ago I have filled similar bug report against @nosent files.
Well that bug is fixed and Leo properly finds global line in @nosent files.
:-)
OTOH, since then @clean files are introduced and suggested as better
replacement for @nosent files. Well, command goto-global-line can't find
Hi John
On Friday, 29 May 2015 13:38:34 UTC+1, john lunzer wrote:
I've been playing around with trying to extract the x,y screen coordinates
of the text cursor in the body but I've come up short. I found QTextCursor
but it's position method does not give screen coordinates like QCursor does
c.frame.body.widget.cursorRect()
will give you the location of the cursor relative to the text body, I think
relative to the top left corner. I think that:
c.frame.body.widget.getContentsMargins() also needs to be factored into
this, ie added to whatever you get from cursorRect()
What I can't
Since Leo works with PyQT/Qt, a look there might help, i.e.
http://www.qtcentre.org/threads/3073-How-to-get-mouse-s-position
Reinhard
On Saturday, May 30, 2015 at 3:20:03 PM UTC+2, john lunzer wrote:
c.frame.body.widget.cursorRect()
will give you the location of the cursor relative to the
While this is definitely interesting and useful it's not the mouse position
that we're looking for but the text cursor position.
However I think this put me on the right track.
So c.frame.body.widget.cursorRect() will provide something
like: PyQt4.QtCore.QRect(52, 4, 3, 26)
if that were