OK, I thought that Q_INIT_RESOURCE(mdi)
was needed to initialize the application in Multiple Document Interface mode. Instead it just loads a set of files (icons in this case) that were missing from my project.
Removing that line fixed the problem.