Andrew Gibson is also alleged to have held a bottle of liquid on his lap and asked pupils from Westhill Academy in Aberdeenshire: “do you know what this looks like?”.
He is alleged to have said he was “deeply uncomfortable” with what the schoolgirl was wearing as he could see her shoulder and bra strap.
It is also claimed he said there was a “level of risk” regarding her outfit.
Mr Gibson is also alleged to have told his senior colleague: “what would it look like if someone passed your office and I am in the corner, like the deputy headteacher was hitting me”.
Mr Gibson faces being struck off the teaching register following an investigation over the comments by the General Teaching Council for Scotland (GTCS).
The teaching regulator is looking into over 20 allegations against Mr Gibson which date from February 2017 to December 2017 at the school.
Headteacher of Westhill Academy, Alison Reid, yesterday said: “He seemed to be uneasy that the pupils weren’t in uniform, particularly with girls and how they were dressed.
“He didn’t go into details about why but he certainly was.”
Making reference to an incident where he refused to teach a female pupil after she took her jumper off, she said: “The middle floor gets very hot and it was in a computer lab, so the pupil took off her hoodie.
“My understanding was that other pupils had removed their hoodies or jumpers but Mr Gibson honed in on her.
“My understanding was it was [appropriate in line with the dress code].
“He was told if he had worries about a pupil’s dress he was to speak to their guidance teacher and not the pupil.
“It was going against what we had agreed was agreed by him and singling out one pupil could have been as isolating.”
Sarah Colville, deputy headteacher at the school, said: “[The girl who was not allowed to take her jumper off] she was roasting and there were no windows open or any fans on.
“He could see her shoulder and a bra strap.
“They got into a bit of an argument.
“There were other pupils dressed the same.
“Andy said that he was deeply uncomfortable [with what Pupil A was wearing].
“He kept saying he was concerned about false accusations.
“I really felt this wouldn’t have escalated if the windows had been opened or put a fan on.
“He definitely singled the pupil out.”
She added that after a meeting between her, head of faculty’s Peter Hagan and Mr Gibson: “Mr Hagan left the office, I stood up to go, then he shut the door and just stood.
“He was just kind of lurking and he’s a big chap.
“Then he made the comment ‘what would it look like if someone passed your office and I am in the corner, like the deputy headteacher was hitting me’.
“I was gobsmacked, I was totally taken aback.
“I felt ‘oh my god, I’m vulnerable here’.”
Jason Fitzgerald, another deputy headteacher at the school said: “There were other girls dressed similarly.
“He was using phrases that he did not want to be exposed to arms, bra straps.
“He said there was a level of risk involved and that concerned me.
“I was deeply uncomfortable the more I thought about what he said.
“The fact he was not wanting to be left ‘open to that level of risk’.
“Those were his words and they stick in my mind.
“It is not a normal conversation to be having at school.”
Mr Gibson faces being removed from the teaching register following an investigation over his alleged comments.
He is also accused of telling his class not to applaud one pupil because their presentation “was not good enough to deserve applause”.
Other charges claim Mr Gibson: “mocked” another pupil by doing an impression of her by flicking his hair.
He is also alleged to have called pupils “fat”, swore in front of his class and used the word “b******s”.
“Calling pupils ‘fat’;
Mr Gibson accused a colleague of “bullying” and “victimising” him and apparently made derogatory remarks about another teacher’s lessons.
The hearing continues.