Well, for a start you should not store the entire file in RAM (That is easily a gigabyte on its own). It sounds like you can parse each line as it is read from file and drop the relevant bits into your QHash in one motion.

Have you considered using a disk-based store instead of the in-memory hash? Hash key lookups are something that the dbm family of libraries do for a living, but any RDBMS (including the zero cost Sqlite) will make decent job of it.