[Interest] DragDrop between different processes not working?
Till Oliver Knoll
till.oliver.knoll at gmail.com
Wed Dec 17 08:29:58 CET 2014
> Am 17.12.2014 um 07:18 schrieb Wilhelm <wilhelm.meier at fh-kl.de>:
> Hi all,
> below is a stripped-down example for drag/drop. It follows the Qt
> examples. It works if I drag from the ListView widget to another widget
> (e.g. QTextEdit) of the same(!) process. But it doesn't work if I drag
> to another(!) process - with the same programm or another, e.g. kate.
Hmmm, it's been a while since I looked into Qt drag and drop, but I AFAICR you do have to explictly enable drop events - per (top level?) widget.
It has nothing to do with "across processes" per se (as long as each process a) accepts drop events and b) knows how to deal with them for each specific case (MIME type)). In fact, drag and drop was probably invented with "across processes" as its main purpose in mind.
Check the Qt docs with regards to "enable/accept drop events". My guess is that your "second process" has drop events "not enabled". Or you are setting a (wrong) MIME type in your first process when starting the drag, and e.g. Kate does not know how to deal with it (and hence refuses the drop).
Just some basic initial thoughts...
More information about the Interest