How to create an animated gif file in Qt? I'm using a QGLWidget, I hope to create an animated gif file when the scene in the QGLWidget is changing.