[QScintilla] Overriding dropEvent

Phil Thompson phil at riverbankcomputing.com
Fri Dec 7 18:42:03 GMT 2007


On Friday 07 December 2007, Baz Walter wrote:
> Hello
>
> I'm trying to implement a feature found in SciTE which converts line
> endings when the user imports text from the clipboard or via drag and
> drop. I've implemented standard paste and selection paste (middle button
> click) without any problems, but drag and drop has got me completely stuck.
>
> The problem is, is that I am using the python bindings and have no way
> to access Scintilla's Editor.DropAt within my dropEvent handler. I also
> can't think of a way to patch QScintilla to make this possible. All I
> really want to do is modify the dropped text before it gets handed to
> Scintilla.
>
> Any ideas how I can make progress with this?

I must be missing something, but why not create a new QDropEvent in your 
reimplementation of dropEvent() that contains the modified text and pass it 
to QsciScintillaBase::dropEvent()?

Phil


More information about the QScintilla mailing list