def addMultiplierController(self): wid = QWidget() wid.setSizePolicy(QSizePolicy()) layout = QHBoxLayout(wid) layout.setSpacing(0) layout.setContentsMargins(0,0,0,0) statcontrol = tightLineEdit() statcontrol.textEdited[str].connect(self.updateMultipliers) wid.control = statcontrol timeslabel = QLabel('\u00d7') timeslabel.setMargin(0) timeslabel.setIndent(0) timeslabel.setAlignment(Qt.AlignCenter) timeslabel.setContentsMargins(0,0,0,0) label = popupButton(['HP','ATK','RCV']) label.stateChanged.connect(self.updateMultipliers) wid.label = label layout.addWidget(statcontrol) layout.addWidget(timeslabel) layout.addWidget(label) self.layout.insertWidget(len(self.mcontrols),wid) self.mcontrols.append(wid) return wid