I cannot use text because i use Custom widget as my ListWidgetItem...

I tried this one:
Qt Code:
  1. Custom_Widget *widget = qobject_cast<Custom_Widget *>(listWidget->itemWidget(0));
To copy to clipboard, switch view to plain text mode 

But the application crashes....
In theory should it work? And will it have the same information that itemWidget(0) has?