Albert Adomah's second-half goal earned victory over Stoke City and ensured QPR will play Championship football next season.
The home side dominated possession, but failed to make the most of their opportunities and Adomah slotted in a rebound to put the R's ahead soon after the restart.
Gareth Ainsworth's side, who sat just four points above the drop prior to kick-off, withstood sustained pressure from the Potters after the break.
But a resolute performance from QPR keeper Seny Dieng saw him make fine saves from Josh Laurent and Tyrese Campbell to ensure a second successive win - just their third in 22 league games.