@naax
Blocking signals is hiding whatever your issue is. You ought to sort out why your setFlags() is causing a problem in the first place, even if you then decide this is the simplest solution.
If the fault is not elsewhere in your code. (You really ought check it out in a debugger.) I suppose it is possible that because you are doing this inside a slot, which is called because the the item is user-checkable and has been clicked, switching off ItemIsUserCheckable might cause a problem to Qt infrastructure code? If it were me I would try moving it out to a timer event or queued connection to establish where the problem is.
Thought:
QObject::connect(ui->listWidget, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(highlightChecked(QListWidgetItem*)));
The code for changing the checkable state is being executed inside your connected highlightChecked slot? If setting the flags raises itemChanged signal you would have recursion till crash? Again, debugger would tell you, or even qDebug() statements.