def floatAsItem(self, value): item = QTableWidgetItem() item.setData(Qt.EditRole, value) return item #Change commmand string when combo box changes