The 22-year-old becomes Robbie Neilson’s second summer signing after the capture of Polish defender Blazej Augustyn.
“It was a wee bit overwhelming; a club the size of Hearts being interested in me, it’s brilliant,” Reilly said.
“Credit to myself for the performances I was putting in last season, hopefully I can do the fans justice and the club justice for coming to sign me.
“Robbie said he’s been impressed by my workrate and my pace, and also my goal-scoring record. Hopefully I can use those skills and talents and bring them here.
“He’s told me I’m not going to play every game but hopefully I can work hard and try and play every game. Hopefully I’ll get a good pre-season under my belt to begin with and who knows what will happen?”
Reilly, who agreed terms on Tuesday, fired QOS to the play-offs last season with 15 goals to his name and Hearts head coach Neilson was full of praise for the striker.
“I’m delighted to get Gavin onboard here at Hearts,” he told the club’s official website. “I’ve no doubts that he can develop into an excellent player.
“He’s a hard worker, a good finisher and he makes runs over the top which will allow us to press really high up the pitch as well.
“He’s desperate to come through here and he’s desperate to do well for us. You want players who have got that hunger and from having spoken to him a couple of times you can tell he’s desperate to progress his career and he sees Hearts as a good opportunity for himself.
“We see an opportunity to develop him. He’ll be coming to a club with really good facilities and he’ll be training more often than he has in the past. Stevie Crawford will give him some really in-depth coaching in the striking department, which will really progress him.”
Hearts also hope to complete the signing of Spanish striker Juanma from Greek Super League side Kalloni later this week.