[Qt-interest] QClipboard: copy from Qt into Gimp (on Windows)?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Dec 27 15:17:04 CET 2010
On 2010-12-27 ITS-CMT-SUI-SL-SFR-FIN-DEV Knoll Oliver, ITS-CMT-SUI-SL-SFR-FIN-DEV wrote:
> ...
> QImage image = ...;
> QMimeData *mimeData = new QMimeData();
> mimeData->setImage(image);
> and
>
> QByteArray data;
> QBuffer buffer(&data);
> buffer.open(QIODevice::WriteOnly);
> image.save(&buffer, "PNG");
> buffer.close();
> mimeData->setData("image/png", data);
> but to no avail: GIMP always tells me that "there is no data for pasting" (note that
> copy/paste into e.g. OpenOffice Draw /does/ work, except the alpha channel).
More specifically: pasting into other applications /only/ works with the first mimeData->setImage() approach. I was not able to paste into any application when saving data as "PNG" and set MIME to "image/png" so far.
And I forgot to mention that this is again on Windows XP, Qt 4.7.1 (binary MinGW distribution).
Thank you,
Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list