[Interest] fromWinHICON missing from Qt 5

Thiago Macieira thiago.macieira at intel.com
Sun Sep 2 15:57:17 CEST 2012

On domingo, 2 de setembro de 2012 22.23.01, Joseph Crowell wrote:
> QPixmap QPixmap::fromWinHICON( HICON ); Is there a reason this has been
> removed? 

Yes, the QPixmap API is platform-independent, completely. The equivalent 
fromWinHBITMAP, fromMacCGImageRef, fromSymbianCFbsBitmap, fromSymbianRSgImage 
and fromX11Pixmap are also gone.

> If so, is there any another method which results in the same
> return values from a windows resource dll?

QPixmap qt_pixmapFromWinHICON(HICON icon);

I can't find it in any header and it isn't documented, but it's exported from 
QtGui. Therefore, treat it as private API for now, until future plans emerge.

For the X11 ones, the idea is to add it to the proposed QtX11Support library, 
which would also bring back QX11Embed{Container,Widget}, QX11DisplayInfo, etc. 
I don't know where the Mac plans place theirs.

> I had a project which loaded windows icons in a list by pulling the
> correct icon from QFileInfo which is of type HICON. I think many people
> did. Maybe if QFileInfo returned a QIcon or QPixmap this wouldn't be
> necessary.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120902/3f510181/attachment.sig>

More information about the Interest mailing list