[QScintilla] Selected text is deleted when focus is lost

Federico federicotedin at gmail.com
Sat Mar 1 04:44:38 GMT 2014


Hi,
I am currently using QScintilla for a personal project, and I've
encountered a problem which I was not able to fix.   First, some
information:  I'm using QScintilla v2.8, Qt v5.2.1 and GCC 4.8.2 to
compile, (system: Linux 3.13.5, w/ GNOME 3.10).

The problem: whenever I select some text on a QsciScintilla widget, if I
interact with another widget, the selected text is erased.

I tried implementing a quick fix:  I reimplemented QsciScintilla's
"focusOutEvent(QFocusEvent*)" function to unset the selection when it was
called (by calling setSelection(0, 0, 0, 0) ).  This fix only works on some
cases: for example, clicking on a button in the Menu bar no longer deletes
the selection, but clicking on the window's title bar still does.

I was wondering if I am not using the QsciScintilla class correctly, or if
this is a bug.

Thanks,
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20140301/ba04687e/attachment.html>


More information about the QScintilla mailing list