[QScintilla] Not desired clipboard overwriting on QScintilla::setSelection()

Phil Thompson phil at riverbankcomputing.com
Thu Feb 23 17:47:48 GMT 2012


On Thu, 23 Feb 2012 17:19:33 +0300, Andrei Kopats <hlamer at tut.by> wrote:
> Hi
> 
> I need to edit text in the QScintilla by software. To do it, I
> 1) Select peace of text with QScintilla::setSelection()
> 2) Remove it with QScintilla::removeSelectedText()
> 3) Insert new text with QScintilla::insertText()
> 
> (I probably can use  QScintilla::removeSelectedText(newtext))
> 
> The problem is that this procedure overwrites window system selection
> clipboard with text I removed.
> I think, QScintilla should copy new text to the selection buffer, only
if
> it was selected by user, not when it was selected automatically.

Unfortunately the underlying Scintilla code doesn't make the distinction.

Phil


More information about the QScintilla mailing list