QPR have signed rookie striker Ben Pattie on a two-year contract after impressing during a recent trial.