Since you are using Slackware 13.1, you will have either: -to apply the patch that makes Qt3 libpng14-compatible (I used the attached one) or -to make the Qt3 build system use the Slackware-provided libpng12 instead of the default libpng14 (the Trolltech-provided libpng-1.2.5 is full of security holes, and is deactivated by a patch of mine that went upstream…); a long time ago I tried this with Trolltech 3.3.8b and Slackware 13.1 and didn't succeed.
I am using a libpng 1.4 patch to build qt3. Not the same as yours and I have updated to use yours.
Are you building qt3 from the original tarball sources or from Trinity git?
Darrell