[PyQt] Drag and Drop when using designer

Andreas Pakulat apaku at gmx.de
Thu Oct 25 11:57:35 BST 2007


On 25.10.07 13:23:20, Jan Ekholm wrote:
> On Thursday 25 October 2007, Andreas Pakulat wrote:
> 
> > Thats mostly for normal QWidget subclasses, the interview classes have
> > dnd support builtin, based on what the model provides. The puzzle
> > example demonstrates this pretty well, you have a listview and a normal
> > qwidget and both have drag and drop capabilities. There's only a
> > subclass for the QWidget, the listview stays "standard" - only the model
> > has proper overrides for the drag/drop methods needed.
> 
> Ok, perhaps I should look at the docs once more to try to figure out the 
> correct way to do that for my own app. But as subclassing works ok and the 
> tree models are just that much too horrible to use I could take a while. :) I 
> wonder what someone smoked when designing the models wrt trees...

Would you elaborate a bit on that? I mean what exactly is the problem
with the tree models? And exactly which tree models are you talking
about? There are none in Qt itself, except for the QStandardItemModel
which allows to build tree's, but of course is not that suitable if you
have legacy code  that you want to wrap in Qt.

Andreas

-- 
A visit to a strange place will bring fresh work.


More information about the PyQt mailing list