I set the display role to Qt:isplay only and the program does filter certain strings. For example the string "TW-" is filtered perfectly fine but other strings don't filter or they crash the program. I am pretty sure the problem is with line 29 in my constructor but I am not really sure what I need to do there.