Thanks to the_mandrill, this is the solution:
First, you need to download patch 3891. Then, you need to apply the patch - you could find a patch utility for windows, but I just edited the files diffed in the patch manually; the files are in \qmake\generators\win32
Then, you need to build QT from scratch, which is done by navigating in command prompt (make sure it's the Visual Studio 2008 x64 command prompt from the Visual Studio directory) to the directory you installed QT in, presumably C:/QT/4.7.0, and typing configure, then nmake.
Building QT will take a long time. In the meantime, adding these to your qmake files will automatically detect your host OS. Keep in mind that this solution does NOT produce both win32 and x64 configurations on x64 - only the x64 configuration.
contains(QMAKE_HOST.arch, x86):{
QMAKE_LFLAGS *= /MACHINE:X86
}
contains(QMAKE_HOST.arch, x86_64):{
QMAKE_LFLAGS *= /MACHINE:X64
}
This produces a working x64 Visual Studio solution that compiles and links without errors.