Julien Gaubert wrote:
> I found this while googling.
> http://lists.trolltech.com/pipermail/qt-jambi-interest/2008-June/000395.html
>
> It looks a lot like my bug and it seems it has been known for a while
> !! (June 2008)
> Do you know if there was a fix for this.
I guess you tried everything in the online docs dealing with the new MVC
approach on list/table
views?
>
> Maybe I can fill a bug report. Is there a place where I could do this ?
Guess you should be able to use this link:

http://www.qtsoftware.com/bugreport-form

Helge F.
>
> Regards.
> Julien.
>
>
> 2009/7/3 Julien Gaubert <gaubert.jul...@gmail.com
> <mailto:gaubert.jul...@gmail.com>>
>
>     Thanks for your answer.
>
>     However, I already tried this.
>     As I said in my first message, I don't want to override the
>     destination item in my list.
>
>     You see, if I uncomment this flag, the GUI final user may erase
>     items.
>     Uncommenting works, but it doesn't give the right functionnality.
>
>     Thanks again however.
>     Regards.
>     Julien.
>
>     2009/7/3 Helge Fredriksen <h...@poseidon.no <mailto:h...@poseidon.no>>
>
>         Hello, Julien!
>
>         I just ran your example and I think you actually were closer
>         than you thought. Just uncommented the
>
>         //                ItemFlag.ItemIsDropEnabled,
>
>         on line 108, and your items just got dropped as well as anything.
>
>         I guess the documentation on
>
>         
> http://doc.trolltech.com/qtjambi-4.5.0_01/com/trolltech/qt/model-view-dnd.html
>
>         should show how to handle the droppings as well as the dragging.
>
>         Regards,
>         Helge Fredriksen
>
>
>
>         Julien Gaubert wrote:
>>         Hi all,
>>
>>         I'm currently experimenting troubles with D&D in QListView.
>>         I joined a simple QListModel subclass and a main program to
>>         illustrate it.
>>
>>         What I want is to be able to move my items in my list but
>>         without overwritting (i.e I want to implement a re-ordering
>>         feature).
>>
>>         I my test, you can see I overrode insertRows(),removeRows(),
>>         data() and setData() methods so D&D can move the items plus
>>         supportedDropActions() and flags().
>>         I didn't put "ItemIsDropEnabled" in flags() method in order
>>         not to overwrite items when dropping something on it.
>>
>>         The problem is that with this implementation of the flags()
>>         method, no drop action is accepted at all (drop indicator
>>         show a "forbidden" image).
>>         Moreover, I read the C++ code of dropIndicatorPosition() (see
>>         below) and it seems that with "ItemIsDropEnabled" not being
>>         flagged, I should get a dropIndicator "AboveItem" or
>>         "BelowItem". (I didn't try to test my example in C++ though)
>>
>>         Does someone know about this issue and/or (even better) have
>>         a solution ?
>>         If this is a bug, any workaround would be appreciated :) (I'm
>>         quite stuck with it).
>>
>>         Best regards.
>>         Julien.
>>
>>         PS : C++ Code:
>>         QAbstractItemView::DropIndicatorPosition
>>         QAbstractItemViewPrivate::position(const QPoint &pos, const
>>         QRect &rect, const QModelIndex &index) const
>>         {
>>             ...
>>
>>             if (r == QAbstractItemView::OnItem &&
>>         (!(model->flags(index) & Qt::ItemIsDropEnabled)))
>>                 r = pos.y() < rect.center().y() ?
>>         QAbstractItemView::AboveItem : QAbstractItemView::BelowItem;
>>
>>             return r;
>>         }
>>
>>         
>> ------------------------------------------------------------------------
>>
>>         _______________________________________________
>>         Qt-jambi-interest mailing list
>>         Qt-jambi-interest@trolltech.com 
>> <mailto:Qt-jambi-interest@trolltech.com>
>>         http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
>>           
>
>
>

_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to