And isn't Custom_Widget derived from ListWidgetItem?

Maybe you need to show us more code so that we can see what you did there, or make a small compilable example in which you replicate the issue.