in children have many causes, the common ones being changes in diet like a low fibre diet, any drug intake like antacids or medical problems.
However you mentioned that your child does not even want to sit on toilet. It is quite possible that she must be really scared to go to the toilet due to the intense pain she may feel while passing stools. It could be due to an anal fissure
and this possibility must at any cost be ruled out.
Kindly have her examined with a Pediatrician
to rule out a fissure.
Unless the underlying problem is solved, she will continue to have constipation.