Here's a very famous game with an early Qf3:
Rashid Gibiatovich Nezhmetdinov vs Enrico Paoli (1954)
Despite the nice result, can you see that White ultimately ending up pushing the f-pawn forward in order to pursue an attack? Would it not have been easier if the f-pawn was pushed before Qf3 (although f4 was with tempo because it attacked the Knight, but we are talking general ideas).
However, there are lines in the 6 Bc4 variation were playing Qf3 is favorable over f4 followed by Qf3, the idea being that White is aiming for quick piece play, and to get the Bishop outside the pawn chain (often via Qg3 and Bh6) before locking it in with f4. However the Queen cannot stay on f3 forever, and nor can the pawn stay on f2 forever, as White needs to advance the f-pawn to open lines.
It's not so simple as active piece play vs. active pawn play, since f4 helps tie into an overall strategy of getting better squares for your pieces and opening lines for your pieces. So therefore f4 should be preferable because it ties in both concepts (but there are cases where it would be better if a pawn on f4 stood on f2, or where it would be better to just pursue quick piece play.)