class BodyListManager(QObject): def __init__(self, listWidget): self.listWidget = listWidget; self.listWidget.setDragDropMode(QAbstractItemView.DragOnly); self.listModel = BodyListModel(); self.listWidget.setModel(self.listModel) def updateList(self, bodies): self.listModel.setStringList(list(bodies.keys()))
def __init__(self, listWidget): self.listWidget = listWidget; self.listWidget.setDragDropMode(QAbstractItemView.DragOnly); self.listModel = BodyListModel(); self.listWidget.setModel(self.listModel)