I'd say you have an uninitialized pointer somewhere. Your plugin is fine if the widget shows up in Designer.