Olivia Wilde opened up about how she keeps going through the "burning hellfire of misogyny" in the entertainment industry during an event Monday.

The "Don't Worry Darling" actress delivered her speech at the Elle's Women in Hollywood event just hours after Wilde and ex Jason Sudeikis issued a statement denying a former nanny's allegations about their relationship. 

"Let’s face it, it’s not always easy to keep going," Wilde said, according to Page Six. 

"In fact, sometimes it’s tempting to excuse ourselves from the burning hellfire of the misogyny that defines this business and say, ‘Good night, good luck, I’d rather eat glass for a living.'"

Olivia Wilde gives a speech

Olivia Wilde gave a speech hours after the nanny of the actress's kids with Jason Sudeikis made public claims about the former couple's relationship. (Frazer Harrison/Getty Images for Elle)

OLIVIA WILDE, JASON SUDEIKIS SLAM ‘FALSE AND SCURRILOUS’ CLAIMS FROM FORMER NANNY: ‘INCREDIBLY UPSETTING’

Olivia Wilde attends an Elle event

Olivia Wilde attended the 29th Annual Elle Women in Hollywood Celebration Oct. 17, 2022. (Kevin Winter/Getty Images)

Wilde went on to explain what helps her get through it.

"It often takes the form of a tight grip of your shoulders and an intense stare into your eyes and a defiant, ‘Do not let them f--- with you," she said. 

OLIVIA WILDE SLAMS ASSUMPTION SHE'S ‘ABANDONED’ HER KIDS WITH EX JASON SUDEIKIS

Hours before Wilde appeared at the event, Wilde and Sudeikis' former nanny gave an interview during which she alleged Sudeikis discovered Wilde was in a relationship with Harry Styles after finding e-mails on an Apple Watch, adding the "Ted Lasso" star was so upset over the relationship that he lay under Wilde’s car to stop her from going to visit Styles.

The nanny also claimed Sudeikis banned any staffers from playing Styles’ music in their home. She reportedly worked for the family for more than three years.

Olivia Wilde with Jason Sudeikis

Jason Sudeikis and Olivia Wilde split in 2020 after a seven-year engagement.  (Getty Images)

Shortly after the interview was published, Wilde and Sudeikis put on a united front and denied the claims.

"As parents, it is incredibly upsetting to learn that a former nanny of our two young children would choose to make such false and scurrilous accusations about us publicly," the couple shared in a joint statement to Fox News Digital.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

"Her now 18-month-long campaign of harassing us, as well as loved ones, close friends and colleagues, has reached its unfortunate apex. We will continue to focus on raising and protecting our children with the sincere hope that she will now choose to leave our family alone."

Sudeikis and Wilde began a romantic relationship in 2011.

Olivia Wilde and Harry Styles in London

Olivia Wilde has since been romantically linked to musician Harry Styles. (Neil Mockford/GC Images)

The actor proposed to Wilde in 2013, but the two never officially tied the knot. It's unclear when Sudeikis and Wilde called off the relationship, but they publicly confirmed the split in November 2020.

Since the end of their relationship, Wilde has been romantically linked to Styles. The musician starred as the leading male character in "Don't Worry Darling," which Wilde also starred in and directed.

CLICK HERE TO GET THE FOX NEWS APP

The two first sparked romance rumors in January 2021 after they were spotted holding hands at a wedding.

Fox News Digital's Janelle Ash contributed to this report.