Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
Description
If text is dragged from an embedded text edit or main window with docks, then it will be seen that the drag offset is wrong. It seems to be calculated relative to the distance between the cursor and the "actual" position of the window. This causes the drag icon to be drawn far away from the cursor.
In the following test case notice how the drag icon is visible only in non-embedded mode.
Test case main.cpp to reproduce
===============================
#include <QtGui>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QListWidget listWidget;
listWidget.setDragEnabled(true);
for (int i = 0; i < 10; ++i)
{ QListWidgetItem *item = new QListWidgetItem("Hello"); item->setFlags(item->flags() | Qt::ItemIsDragEnabled); listWidget.addItem(item); }#if 1
QGraphicsScene scene;
scene.addWidget(&listWidget);
QGraphicsView view(&scene);
view.show();
#else
listWidget.show();
#endif
return app.exec();
}