[PyQt] QTreeWidget - drag&drop help

Taylor Carrasco crackerbunny at gmail.com
Thu Oct 22 21:23:49 BST 2009


I can't grab which QTreeItemWidget was dragged, and the QTreeItemWidget it
was dragged onto (parented under).


On Fri, Oct 23, 2009 at 6:38 AM, Baz Walter <bazwal at ftml.net> wrote:

> Taylor Carrasco wrote:
>
>> For my QTreeWidget I'm still confused as to what to put in dropEvent()
>>
>> Again, I only have event.accept() so far, and I can't figure out what else
>> I
>> need to make sure the row I'm dragged get's put into the row it supposed
>> to,
>> just as if I had never written the custom event in the first place.
>>
>> def dropEvent(self, event):
>>        print 'Drop pos: ', event.pos()
>>        event.accept()
>>
>
> why are you trying to reimplement dropEvent? QTreeWidget has built in
> support for drag and drop. what is it that you can't do using the default
> implementation?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091022/34f2d9ed/attachment.html


More information about the PyQt mailing list