def updatePlayerOrder(self): GameWidget.updatePlayerOrder(self) trash = QtGui.QWidget() trash.setLayout(self.playersLayout) self.playersLayout = QtGui.QVBoxLayout(self.playerGroup) self.playersLayout.addStretch() for i,player in enumerate(self.engine.getListPlayers()): trash.layout().removeWidget(self.playerGroupBox[player]) self.playersLayout.addWidget(self.playerGroupBox[player]) self.playerGroupBox[player].setColour(PlayerColours[i]) self.playersLayout.addStretch() self.detailGroup.updatePlayerOrder()
def updatePlayerOrder(self): GameWidget.updatePlayerOrder(self) self.details.updatePlayerOrder()