Hi Phil, I have simulated the required behavior with the following code (textEdit is my QsciScintilla based class):
textEdit->setCursorPosition(line, 0); textEdit->ensureLineVisible(line); textEdit->SendScintilla(QsciScintilla::SCI_SETFOCUS, true); Thanks a lot! On Thu, Jan 6, 2011 at 11:09 AM, Phil Thompson <[email protected]> wrote: > > On Wed, 5 Jan 2011 17:46:27 -0200, Roberto Gerson > <[email protected]> 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 -- sds/ Roberto Gerson de Albuquerque Azevedo (http://laws.deinf.ufma.br/~roberto) ---------- Mestre em Informática - Puc-Rio Pesquisador - Laboratório Telemídia (http://www.telemidia.puc-rio.br) Bacharel em Ciência da Computação - UFMA Pesquisador - Laws - Laboratory of Advanced Web Systems - UFMA (http://laws.deinf.ufma.br) ---------- Clube NCL: A liberdade de desenvolver e compartilhar conteúdo interativo! Visite: http://clube.ncl.org.br _______________________________________________ QScintilla mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/qscintilla
