Add the following line in your constructor

Qt Code:
  1. listWidget = new QListWidget(this);
To copy to clipboard, switch view to plain text mode 

Also, I see that the following line is not correct

Qt Code:
  1. newList->addItem("xxx"); // SEGMENTATION FAULT - but not if in the constructor
To copy to clipboard, switch view to plain text mode 

There is no variable called newList