[Interest] Qt5: Converting from a QPixmap to an NSImage on OSX

Joseph Crowell joseph.w.crowell at gmail.com
Mon Nov 5 14:54:54 CET 2012

On 11/3/2012 6:10 PM, Andreas Pakulat wrote:
> Hi,
> On Sat, Nov 3, 2012 at 7:31 AM, Colin Dean <cad at cad.cx> wrote:
>> When I compile against Qt 5.0.0-beta2, it errors at the line marked above.
>> Looking through the Qt5 documentation, it appears that
>> QPixmap::toMacCGImageRef() no longer exists. I looked through the
>> documentation and verified its presence in Qt4 [1] and its absence in 5.0
>> [2].
>> As you can see, the code snippet here needs to take a QIcon and make it into
>> an NSImage. I can obviously transform the QIcon to a QPixmap, but I'm not
>> sure where to go from there. The QPixmap can be transformed to a QImage, but
>> there doesn't seem to be anywhere to go from there.
>> Is there another recommended way to accomplish this? Could these CGImageRef
>> methods have been erroneously removed? or perhaps simply moved to another
>> class?
> The recommended way is apparently to wait for Qt 5.1 or to write your
> own conversion function, Qt5.0 has dropped most of the
> platform-specific API's and re-introduction is only planned as new
> modules in Qt5.1. This mailing lists archive should have some
> references to such cases.

toWinHBitmap() and fromWinHBitmap() for example.
> Andreas
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list