The Brisbane mother has told how she attacked a naked intruder with a sword after finding him in her daughter's bedroom.

In Brisbane District Court this morning the girl's mother was visibly upset as she testified at the trial of a man accused of breaking into her home and raping her three-year-old daughter.

She told how she used an ornamental sword to hit the man until he bled because she believed he had molested her daughter.

The 31-year-old Brisbane man, who cannot be named for legal reasons, has pleaded not guilty to aggravated burglary, rape and indecent treatment of a child under 12. It is alleged he used a digital camera to take photos of himself abusing the girl in her bed.

The young mother, who cannot be identified as it would identify the child, gave evidence she was woken by her husband waking "with a jolt" in their bed at 2.30am on January 21 last year at their home in Aspley, in Brisbane's north.