[Qt-interest] Bug in QAbstractItemView drag behaivor?

Stephen Kelly steveire at gmail.com
Mon Feb 7 12:21:51 CET 2011


Alexander G wrote:

> Hi,
> 
> is there really no one who can reproduce my problem or is my explanation
> unclear somehow?

You need to file a bug report.

http://bugreports.qt.nokia.com/

If you go to the trouble of creating a test case which shows a bug always 
make sure to file a bug report. The people who fix bugs don't read this 
mailing list.

I ran your testcase and saw the bug.

All the best,

Steve.

> 
> Alexander
> 
> Am 03.02.2011 14:24, schrieb Qt Mailinglists:
>> Hi,
>>
>>
>> A few days ago I came across a strange problem with a QListView I use.
>>
>> If I drag an item which is not visible if the view is scrolled to the
>> top there was no QDrag Pixmap displayed. After some debugging I came up
>> with this minimal example:
>>
>> http://pastebin.com/SVY3U7tE
>>
>> #include<QtCore/QString>
>>
>> #include<QtGui/QApplication>
>> #include<QtGui/QListView>
>> #include<QtGui/QStringListModel>
>>
>> int main(int argc, char *argv[])
>> {
>> QApplication a(argc, argv);
>>
>> QListView dragList;
>>
>> QStringList strings;
>> for (int i = 1; i<  100; i++)
>> strings<<  QString("%1. text item").arg(i);
>>
>> QStringListModel *dragModel = new QStringListModel(strings,&dragList);
>>
>> dragList.setDragEnabled(true);
>> dragList.setDragDropMode(QListView::DragOnly);
>> dragList.setModel(dragModel);
>>
>> dragList.show();
>>
>> return a.exec();
>> }
>>
>> Can someone confirm that there is a bug if you drag an item which is not
>> one of the items which are visible if the view is scrolled to the top.
>>
>> Sorry for my crappy english, but I hope you where able to understand
>> what I tryed to explain.
>>
>>
>> Alexander





More information about the Qt-interest-old mailing list