St Johnstone have signed QPR midfielder Michael Doughty on loan until the end of the season, the Scottish Premier League club have confirmed.