def initUI(self):
    ' Инициализируем содержимое окна '
    self.sub_objs = QtWidgets.QListWidget()
    for obj in self.__obj.sub_objects:
        a = QtWidgets.QListWidgetItem()
        a.sub_obj = obj
        a.setText(obj.name)
        self.sub_objs.addItem(a)
    self.form = QtWidgets.QFormLayout()
    self.form.addRow(self.sub_objs)
    self.setLayout(self.form)
    self.sub_objs.itemDoubleClicked.connect(self.isDoubleClicked)
Инициализируем содержимое окна
def initUI(self):
    '  '
    self.sub_objs = QtWidgets.QListWidget()
    for obj in self.__obj.sub_objects:
        a = QtWidgets.QListWidgetItem()
        a.sub_obj = obj
        a.setText(obj.name)
        self.sub_objs.addItem(a)
    self.form = QtWidgets.QFormLayout()
    self.form.addRow(self.sub_objs)
    self.setLayout(self.form)
    self.sub_objs.itemDoubleClicked.connect(self.isDoubleClicked)