DDS image file paint failed...use QPixmap open the image file, and then covert it to QIcon and paint.
General and Desktop
3
Posts
1
Posters
694
Views
1
Watching
-
DDS image file paint failed...use QPixmap open the image file, and then covert it to QIcon and paint.
the code is like this:
QPixmap pixmap("...imagePath...");
QIcon icon = QIcon(pixmap);
if ( !icon.isNull() )
{
icon.paint(......);
}and the QPixmap is read success, because i got its resolution right.
and the icon is always not Null...it do paint...but for some DDS file, it just paint a white image, or nothing at all....