[QScintilla] Keeping Caret line without focus
Phil Thompson
phil at riverbankcomputing.com
Thu Jan 6 13:09:20 GMT 2011
On Wed, 5 Jan 2011 17:46:27 -0200, Roberto Gerson
<rg.albuquerque at gmail.com> wrote:
> Hi everyone,
>
> I have an XML Editor Widget based on QScintilla working fine. Also, I
have
> a
> TreeWidget that shows the elements from that XML document.
>
> Additionally, I am able to specify when the user selects (through mouse)
an
> element in the TreeView, the QScintilla will show the line that element
is
> in the document.
>
> So, my problem is: when the user selects the treeview, focus goes to
that
> treeview and QScintilla don't show caret line anymore. Are there any
simple
> way to keep the caret line, even the qscintilla is not focused anymore ?
>
> Thanks in advance!
That's the behaviour of the underlying Scintilla code.
You could use QsciScintilla::setCaretLineVisible(true) when you lose the
focus, and clear it when you get the focus back.
Phil
More information about the QScintilla
mailing list