I've changed it to check if it's in the first edit, to stop the timer so it'd look like
And then the user will have to manually hit "Delete" repeatedly to delete the characters. This way, the program doesn't crash. It's not exactly elegant, but it's close enough to the requirements I was given.
I have also changed that curEdit->installEventFilter(this) is only called once.
Thank you very much for your help, I will go ahead and mark this as solved.
Thank you @jsulm, I thought I read the documentation through, but apparently not. Also, I'm not calling QFrame. I saw the link I posted and used it as more of a guideline to create an IP Editor for my needs. Thank you for your help :)