If White can blockade the Pawn by putting the Queen or the King in front of the Pawn (say, d1) White will win, of course.
Even if the Queen and the King are both distant, White still wins.
Bring the Queen in with checks and make the Black King blockade or lose the Pawn; then bring in the King.
1. Qd5 d2 2. Kd7 Kc2 3. Qc4+ Kb1 4. Qd3+ Kc1 5. Qc3+ Kd1
Now White can move the King:
6. Ke7 Ke1 7. Qe3+ Kd1 8. Ke6...
The King creeps forward until it gets within range (Case 2)...
With the White King close, White wins by attacking the Pawn with the King.
1. Qc3+ Kd1 2. Ke3 Ke1 3. Qxd2+ Kf8 4. Qf2#
With the White King distant, a Rook's Pawn (a-Pawn or h-Pawn) draws:
1. Qb4+ Ka1
...and White has no time to move the King closer because of stalemate.
With the White King distant, b-Pawn (or g-Pawn) loses.
White wins as in case 2: there is no stalemate trap.
With the White King distant, a c-Pawn (or f-Pawn) draws:
1. Qb3+ Ka1!
With White King not so distant, and on same side as the Black King, White wins (just!) by threatening mate:
1. Kc2 f1=Q 2. Qd2#
Other squares can also work: Kc1 and Ke3 in the diagram above.