7 Jun 2011 13:53
Re: Drag-and-drop editing in QListWidget or QListView
Nathan Weston <nathan <at> genarts.com>
2011-06-07 11:53:05 GMT
2011-06-07 11:53:05 GMT
On 06/02/2011 07:42 PM, David Boddie wrote: > The draganddrop/puzzle example provided with PyQt uses a QListWidget to > display a collection of puzzle pieces that can be dropped inside or outside > the list, though it's not exactly the most user friendly interface you > could imagine. > > The itemviews/puzzle example is more or less the same, but uses QListView > instead of QListWidget. It implements support for drag and drop in a > custom model, which is based on QAbstractListModel to make it as simple as > possible. Strangely, the piece movement is quite a bit more intuitive than > in the other example. > Thanks, that got me started in the right direction. It seems that I basically have to reimplement the InternalMove behavior myself -- it has some nice visual touches that aren't duplicated in the examples. This leaves me wondering, though -- if InternalMove doesn't give you any way to find out when things move, what's the point? -- -- . . . . . . . . . . . . . . . . . . . . . . . . . Nathan Weston nathan <at> genarts.com GenArts, Inc. Tel: 617-492-2888 955 Mass. Ave Fax: 617-492-2852 Cambridge, MA 02139 USA www.genarts.com
RSS Feed