The enterprising boy managed to snap himself with the monarch in the background - although she did not seem entirely amused by his antics.
The Queen, who was accompanied by Prince Philip, was visiting Belfast.
In a speech at the City Hall, she said that she was witnessing how locals were working together for the common good.
She said: "I know there are many challenges ahead and peacemaking is not always an easy task.
"But you have come this far by turning the impossible into the possible; and, as you face the future and difficulties that may appear insurmountable, always remember that the thoughts and prayers of millions, including my own, are with you."
The Queen added: "The world yearns for examples of positive transformation and of people overcoming differences.
女王接著說道:“全世界都期盼著有一個好的結果,與克服了困難的人們作為榜樣。”
"I hope and believe that Belfast will continue to be one such living example, and I want to thank you - all of you - from every part of this city for the hard work and dedication which you and your families have given to help reshape the city of Belfast and the lives of all the people who live here."
The Queen gave the short speech at a special banquet in her honour after visiting Crumlin Road Gaol with Stormont First Minister Peter Robinson and Deputy First Minister Martin McGuinness - both of whom spent time in the cells during the Troubles.
女王在北愛爾蘭議會首席大臣彼得·羅賓遜和副首席大臣馬丁·麥吉尼斯的陪同下參觀了Crumlin Road Gaol——這兩位大臣在北愛爾蘭動亂期都曾被關進監獄里。
Before their engagement at City Hall, the Royal couple stopped off at the nearby St George's market.
The Queen, who was wearing an yellow Angela Kelly coat and hat, and the Duke chatted to local traders as they walked round a diverse range of stalls.
At the end of her walkabout, chairman of the traders Pat Dyer presented the couple with a hamper packed full of locally made products.
His three-year-old grandson Jack Morgan gave the Queen a cushion with an image of a helicopter on it for Prince George.
"He's been practising and he said when he handed her the cushion 'this is for baby George'", Mr Dyer added.