[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Moving Python objects around a QAbstractItemModel and QTreeView drag/drop
From:       Kyle Altendorf <sda () fstab ! net>
Date:       2020-09-28 2:32:33
Message-ID: a19627e1b7fd754794cee92da772e87f () fstab ! net
[Download RAW message or body]

On 2020-09-27 22:06, Scott Ballard wrote:
> Have there been any advances made in drag/drop Python objects contained 
> in a QAbstractItemModel and QTreeView? Years ago you'd have to pickle 
> the Python object into a QMimeData and after the move decode it. This 
> seems a bit crazy just to move an item in a TreeView.

Toss it in a dict and pass the key through the drag process.  My objects 
happen to have UUIDs for other uses so I use that.

Cheers,
-kyle
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic