[PyKDE] Dragdrop with a QTreeView?

Andreas Pakulat apaku at gmx.de
Wed Jun 14 09:27:59 BST 2006


On 13.06.06 16:32:09, Adam Tenderholt wrote:
> >Hmm, this sounds like something I already reported to TT, however my
> >example uses only 1 view and its a listview. The problem here is that
> >the items are only moved visually and not on the underlying model. Also
> >the move brings items on top of each other, somehow "merging" them.
> 
> Weird. What do you think of the following hack?
> 
> 1) When building mimedata, store items in a list for later use
> 2) If drop is successful (ie. dataChanged() signal is emitted), begin
> removing items in the stored list

Well, for a QListView you won't get notified when the drop is finished.
The QListView just moves it's internal QListViewItem to the new visual
position, not signals emitted..

> >Well, the TT support sounded like there are a few issues with moving,
> >which will be fixed in Qt4.2 so I guess you have to wait til that one
> >comes out...
> >
> >I find it rather sad that Qt4 has so many bugs atm and that a lot of
> >them can only be fixed with Qt4.2...
> 
> Hasn't Qt4 been plagued with quite a few bugs, ever since the first
> release? It's quite unfortunate, and stressful because I assume I'm
> the one making the mistakes.

I don't assume that anymore, for any error that is not obviously in my
code. For any "weird" behaviour I try to build a minimal example, post
it on qt-interest for a few days and then send bugreport to TT. We can
only hope that Qt4.2 will have a _lot_ less bugs, especially as KDE4 will
be built on top of it.

Andreas

-- 
There was a phone call for you.




More information about the PyQt mailing list