True, but it should be noted that the Q2 had more drawbar horsepower than the Allegheny. It is comparing apples to oranges in a sense, but one could also say that they are more similar than different. Just a thought.
Well, you could lump them all together since they were all locomotives propelled by steam.

But I find it fascinating to examine each separately, not just their particular specs, but also their design and how they were utilized.
To really consider any locomotive one has to look beyond specs. To me it's interesting that some of the locomotives that scored the highest in terms of tractive effort, horsepower, etc. were locomotives that were outlived by locomotives with lesser specs (the Jawn Henry, C&O M1, the Triplexes, come to mind.)
The Q2s are another example of a high-spec'ed loco that was outlived by the older J1s, even though the Q2s had higher horsepower ratings. If I remember correctly, the 7,987 HP @ 57.4 MPH rating for the Q2 was from tests performed by the PRR at their static testing facility, and I believe the 6,552 HP @ 85.5 MPH rating for the PRR J1s came from the same plant. In other words, the data was probably very realistic (which is probably not the case for many of the specs oft' quoted.)
The Q2's HP advantage seems impressive but the operational and maintenance costs were about 50% higher (if I remember correctly) for the Q2s vs the J1s, so the J1s won out. The Q2 were scrapped in the early '50s while the J1s survived until 100% dieselization occurred. The Q2s were also outlived by the C&O/VGN 2-6-6-6 locos and the N&W Class A 2-6-6-4 locos, despite the fact that those locos had slightly lower horsepower ratings.
One aspect of the Q2 design was suppose to solve the "hammer blow" problems PRR was having with its J1s. Specifically, both used 10 drive wheels, but the Q2 used 4 cylinders vs. the 2 used on the J1s. Doing so meant that lighter rods, axles, counterbalances, etc. could be used on the Q2, since the powerful trusts from the cylinders could be divided among two sets of drivers. This idea apparently worked very well (the Q2 could achiever higher speeds without "hammer blow" problems) but in the meantime, PRR managed to solve the J1 problem by replacing the J1s' counterbalances with re-designed counterbalances. As it turned out, the C&O had done this very thing years earlier on their T1 Class (the locos the PRR J2 were based on) but the PRR was apparently unaware of it when the J1s were being ordered, thus the PRR J1s were built to the original specs (before the re-counterbalancing was done.)
In theory, the Q2s were capable of hauling freight at higher speeds than J1s, but in reality the PRR had few stretches of track that permitted operation >50MPH, so the Q2s advantage could never fully be realized. With higher operating and maintenance costs, using the Q2s offered no real monetary advantage over the J1s.
Like the C&O/VGN 2-6-6-6s and the N&W 2-6-6-4s, the Q2s were horribly
underutilized. All should have been running 60 MPH+ freight consists, but they were only able to do so briefly on short sections. The Challengers and Big Boys fared much better in this regard...
It's a shame the 100% dieselization occurred so early. It would have been interesting if steam had lasted through the 1970s for example, with diesels performing the grunt work and the best from the last generation of steam being able to stretch their legs handling high-speed freight runs.