[QScintilla] force copy-action when drag&dropping between two QScintilla widgets

Phil Thompson phil at riverbankcomputing.com
Wed Sep 17 17:05:44 BST 2014


On 17/09/2014 1:08 pm, Marc Gronle wrote:
> Hi there,
> 
> I try to enable a drag&drop-action between to QScintilla widgets but I
> don't want that the text of the source window is deleted if no keyboard
> modifiers are used once the text is dropped onto another text field.
> 
> I tried to changed the defaultDropAction in the drop-event of the 
> receiver
> widget, however QSciScinitllabase::dropEvent calls acceptAction 
> (private)
> that calls acceptProposedAction() instead of accept() such that the
> original default action of QDrag::exec is used (MoveAction).
> 
> Unfortunately acceptAction is private and cannot be overwritten.
> Is there another possibility to force the source QScintilla instance 
> not to
> delete the text after an arbitrary drag&drop action?
> 
> I'm thankful for any suggestion.

How would you do this if you were using QTextEdit instead? Can you 
provide a short script which does this?

Phil


More information about the QScintilla mailing list