If I recall correctly, the way you measure tonnage is different for naval vessels than for civilian vessels. But I cannot remember what the difference is.
CVN77 has a Displacement of 97,000 tons.
I have no idea how to reconcile those two measurements.
QM2 is longer than CVN77 (assuming that the measurement is at the same place (however that might be defined), but CVN77 is much wider (252feet, flight deck) than QM2 (147.5 feet, bridge wings). However, QM2's hull is wider (135 feet) than CVN77's (134 feet). Depending on where the length is measured, and the shape of the hull, that may add up to a much larger displacement. I think it safe to say that they are comparably sized ships (more so than I originally thought). Both are utterly dwarfed by the Knock Nevis, a monstrous supertanker. Length = 1504ft, beam=226ft, summer displacement = 647,955 t. I note that the Knock Nevis is not used as a ship, in the usual sense of the word.