Thanks Justinn, that was it.

I guess that the next step is to be able to insert it before or after. The 
treeWidget by default highlights a line under or above, to indicate where 
the insertion will be done.
At the moment myInserted item is taking the place of the one that is 
dropped one. But I guess that it won´t be simple to do, since I will have 
to create methods to mimic this behavior?

My other question is if I am doing right the dropEvent(), because all I am 
doing is creating a new item and copying the text of the item in the left. 
I will also copy the data stored as userRole.
But is this a real drag and drop? I am just creating a newItem and copying 
the text and data of the item selected in the left.

R

El sábado, 8 de abril de 2017, 4:01:21 (UTC+1), Justin Israel escribió:
>
> If you now have the drop position from the QDropEvent, then you should be 
> able to inspect the item under the position via itemAt 
>
> http://doc.qt.io/qt-4.8/qtreewidget.html#itemAt
>
> From there you can choose how you want to insert
>
> Justin 
>
> On Sat, Apr 8, 2017, 4:10 AM Rudi Hammad <[email protected] <javascript:>> 
> wrote:
>
>> sorry, badLink. This is the one --> https://pastebin.com/S6DZd5MM
>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/dbe817a4-5b86-480f-8e85-6073b1c2e88b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/dbe817a4-5b86-480f-8e85-6073b1c2e88b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/830582ed-cbce-4d87-87f6-ef2d4ba5038f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to