J.,
A urinary tract infection was my first thought. That's pretty much a simple fix, just a simple urine test (pee in a cup), then a round of antibiotics. If your daughter is prone to yeast infections, it's worth mentioning to the doctor before starting antibiotics because they can make problems with excessive yeast flare up. Provided a UTI is the only problem, that should clear her problem right up.
My daughter, when she was six, started having accidents, although they were mostly only bowel accidents. My daughter was VERY difficult to potty train (didn't train until she was 4), and is also a strong-willed child. Her problem was entirely willful in nature, and she only did it in situations where she either wasn't getting her way, or when she felt she didn't have my undivided attention (only child!). She had had no new medications or stressors in her life at the time, and gentle discipline did correct her problem. However, the fact that your daughter seems to be embarrassed about it and tries to hide it or explain it indicates to me that this is not something she's doing on purpose. Hopefully it's an easy fix (such as UTI), but if that comes back negative, look to environmental factors. It's possible that this is due to internal stress from the divorce, or as the other respondent said, she could be afraid of the toilet for some reason. Maybe she's embarrassed to ask to use the toilet in front of her class. Or she could just be so busy playing or studying or whatever that she just doesn't realize she has to go until she REALLY has to go.
In any case, continue to reassure her, and try to have her father do the same. If your daughter sees you working together as a team, it will relieve some of her fears. Even if that isn't what is causing this problem, she'll feel better all around knowing that even if the family lines have changed, it's still her family and she's still loved and cherished. Good luck.