I know this discussion is somewhat old, but I originally found it while looking for a way to load a DDS image in Qt. I figured out one way to do it eventually so if anybody else comes here looking for the answer, there it is:

https://gist.github.com/bjorn/4635382

Qt Code:
  1. QImage readDDSFile(const QString &filename)
  2. {
  3. QGLWidget glWidget;
  4. glWidget.makeCurrent();
  5.  
  6. GLuint texture = glWidget.bindTexture(filename);
  7. if (!texture)
  8. return QImage();
  9.  
  10. // Determine the size of the DDS image
  11. GLint width, height;
  12. glBindTexture(GL_TEXTURE_2D, texture);
  13. glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
  14. glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
  15.  
  16. if (width == 0 || height == 0)
  17. return QImage();
  18.  
  19. QGLPixelBuffer pbuffer(QSize(width, height), glWidget.format(), &glWidget);
  20. if (!pbuffer.makeCurrent())
  21. return QImage();
  22.  
  23. pbuffer.drawTexture(QRectF(-1, -1, 2, 2), texture);
  24. return pbuffer.toImage();
  25. }
To copy to clipboard, switch view to plain text mode 
For information on the supported formats see http://qt-project.org/doc/qt-4.8/qgl...#bindTexture-2.

The main problem with the code snippet above is that it didn't actually draw the texture to the pixel buffer.