Ben Woodburn, who spent last season on loan with the Scottihs club, opened the scoring after half an hour, before a second half penalty for Hearts made it level.
Alan Browne went onto bag the winner to make it two from three after beginning their pre-season campaign with defeat to Getafe, followed by a narrow win over Accrington Stanley.
The Lilywhites will now face a home tie with Leicester City before they return to Championship action at the end of the month.
Here are today’s rumours...
1. Nottingham Forest join race for relegated star
Nottingham Forest have joined Everton in the race to sign Watford forward Emmanuel Dennis, however the Hornets will demand around £25 million for the Nigerian. (TEAMtalk)
2. Stoke City closing in on Premier League striker
Newcastle United striker Dwight Gayle is reportedly close to sealing a permanent move away after undergoing the first part of his medical with Stoke City. The 32-year-old only made eight Premier League appearances last season. (Daily Telegraph)
3. Birmingham City end interest in ambitious signing
Birmingham City are no longer targeting a surprise move for Diego Costa as he would be too expensive for the Championship club. The 33-year-old is a free agent after terminating his contract with Atletico Mineiro in January. (Daily Mirror)
4. Norwich winger set to make Netherlands move
Norwich City winger Christos Tzolis is set to join FC Twente on loan this summer, a year after the Canaries signed him for €11 million. The 20-year-old failed to pick up a single goal contribution in the Premier League last season. (Football-Oranje)