Leicester City have secured promotion to the Premier League after QPR and Derby County lost on Saturday afternoon.