I'm trying to port an application from QT3 to QT4. Some of the .ui files contain embedded image files and the original images are not available.

Is there a tool that I can use to extract all images from the .ui files? I know that it's possible to extract the data into an image by hand, but I'm looking for a way to automate this.