Hi,
I'm trying to make the pixmap on a QDrag object be semi-transparent, and not having much luck. Is it possible?

Here is the code I've got right now:

Qt Code:
  1. void MyTreeView::startDrag(Qt::DropActions supportedActions)
  2. {
  3. QDrag *drag = new QDrag(this);
  4.  
  5. QPixmap pixmap("/path/to/my/image.png");
  6. QPixmap alphaChannel(pixmap.width(), pixmap.height());
  7. alphaChannel.fill(QColor(128,128,128));
  8. pixmap.setAlphaChannel(alphaChannel);
  9.  
  10. drag->setPixmap(pixmap);
  11.  
  12. drag->exec(supportedActions);
  13. }
To copy to clipboard, switch view to plain text mode 

However, setting the alpha channel on the pixmap just makes it look faded, but doesn't actually show the window contents underneath the pixmap, so it's not really transparent.