PyQt QMainwindow call QListWidget from a different file

change these rows

self.lw = ListWidget()
def __init__(self):
super(ListWidget, self).__init__()

to

self.lw = ListWidget(self)
def __init__(self, parent=None):
super(ListWidget, self).__init__(parent)