QClipboard setImage alpha black



  • Hello,
    I stumbled upon a problem with QClipboard and image transparency.
    What I want to do is to set into clipboard transparent image and paste it into Paint application. After setting it up and pasting alpha channel is black.

    My test code:

    @ QImage img = QImage(QSize(640, 480), QImage::Format_ARGB32);
    img.fill( Qt::transparent);
    QPainter p(&img);
    p.fillRect( QRect( QPoint(10, 10), QSize(320, 240)), Qt::red);
    p.end();

    QApplication::clipboard()->setImage( img);@
    

    Qt 5.3.2 MinGW - Win8.0

    Any idea why alpha is black?



  • I tried with different combinations of mime etc. always alpha is black.
    Any idea how to correct this?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.