Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0 Beta1
-
None
-
Linux
-
0712b4ff7139b5c2cc96fd40ea7bb77a9bb8fd1c, ab3603d2b5ed2cb6bc403643d82e97015449546b
Description
I'm trying to set a Drag-Pixmap with the following code which works fine with Qt 4.X. Looks like it broke with Qt5.
TreeView is derived from QTreeView.
void TreeView::startDrag(Qt::DropActions supportedActions) { QPixmap pixDrag(250,24); pixDrag.fill(Qt::transparent); QPainter painter(&pixDrag); // ... drawing something on it using painter QDrag* drag = new QDrag(this); drag->setPixmap(pixDrag); drag->setMimeData(mimeData); drag->exec(supportedActions); }
On Windows everything is fine and the pixmap is transparent. On Ubuntu (12.04. LTS and 13.04) we only get a pixmap filled with black but when saving this pixmap, it is okay. Gimp, Paint etc. will show it correctly.
Please don't pay much attention to the drawn icons. Images are just added to show my point.