Issue when loading an ico from a Qt resource file

后端 未结 5 2294
星月不相逢
星月不相逢 2020-12-21 05:31

I am using Qt Designer 4.8.4 and I include two files in the QMainWindow resource file: a .ico file and a .gif file. When loading from code using:

QPixmap p;
         


        
5条回答
  •  星月不相逢
    2020-12-21 05:47

    *.ico is not supported.

    By default, Qt supports the following formats:

    Format Description Qt's support

    BMP Windows Bitmap Read/write

    GIF Graphic Interchange Format (optional) Read

    JPG Joint Photographic Experts Group Read/write

    JPEG Joint Photographic Experts Group Read/write

    PNG Portable Network Graphics Read/write

    PBM Portable Bitmap Read

    PGM Portable Graymap Read

    PPM Portable Pixmap Read/write

    TIFF Tagged Image File Format Read/write

    XBM X11 Bitmap Read/write

    XPM X11 Pixmap Read/write

提交回复
热议问题