Poppy Wilson died in June 2013 after suffering a cardiac arrest in the home of her mother’s partner.
Michala Pyke and John Rytting are accused of child cruelty.
The court heard that tests on the youngster’s body found that she had ingested a variety of drugs over six months before her death.
David Gordon, prosecuting, said text messages between Pyke and Rytting referenced Poppy having a “blue Smartie” and going to sleep.
He continued: “It”s apparent from the text messages that Miss Pyke viewed Poppy as an inconvenience, who she felt was in the way with regards her relationship with Mr Rytting.”
Mr Gordon added: “She regarded her child, her own daughter, as something of a nuisance and interfering with Miss Pyke”s enjoyment of her relationship with Mr Rytting.”
The trial continues.