You can use QImageReader class and its error() and errorString() methods.

What does QImageReader::supportedImageFormats() return? Your Qt probably wasn't compiled with GIF support.