def initLives(self, lifeCount): for i in range(lifeCount): heart = QPixmap('PNG/Main_UI/HP_Dot.png') heart = QGraphicsPixmapItem(heart.scaledToWidth(32)) heart.moveBy(8 + i * 33, 160) self.lives.append(heart) self.grafickascena.addItem(heart)