drag & drop in a python GUI application
John Posner
jjposner at optimum.net
Sat Jul 3 11:14:17 EDT 2010
On 7/2/2010 11:20 AM, Michael Torrie wrote:
> On 07/01/2010 08:57 AM, Alan wrote:
>> I know drag& drop is not possible with TK.
>
> Is this a Python Tk limitation or a Tk limitation in general? Google
> suggests that Tk itself supports some form of dnd.
>
>> Which widget could I use for my
>> python application to be able to work with drag& drop?
>
> PyQt will do drag and drop on all platforms. GTK does drag and drop on
> Unix/X11, and to a lesser degree Win32--not sure about OS X support. I
> believe wxWidgets also does some level of dnd on all platforms.
Drag-and-drop *is* quite doable with Tkinter. But it's certainly easier
in PyQt:
self.setFlag(G.QGraphicsItem.ItemIsMovable, True)
You can contact me off-list if you'd like to see a drag-and-drop
application that I first wrote using Tkinter, then reimplemented using PyQt.
HTH,
John
More information about the Python-list
mailing list