display choice comment

This commit is contained in:
Maxime Réaux 2026-03-19 15:28:30 +01:00
parent 956fa63c0b
commit e7e2de9d0a

View file

@ -603,8 +603,10 @@ class View(QtWidgets.QMainWindow, Ui_MainWindow):
table = self.choicesTable
table.setSortingEnabled(False)
table.clearContents()
table.setColumnCount(4)
table.setHorizontalHeaderLabels(["Participant", "Priority", "Secondary", ""])
table.setColumnCount(5)
table.setHorizontalHeaderLabels(
["Participant", "Priority", "Secondary", "", "Comment"]
)
table.setRowCount(len(participants))
table.setIconSize(QSize(32, 16))
for row, choice in enumerate(participants):
@ -618,11 +620,13 @@ class View(QtWidgets.QMainWindow, Ui_MainWindow):
status_item = QtWidgets.QTableWidgetItem()
if choice.fallback_icon:
status_item.setIcon(choice.fallback_icon)
comment_item = QtWidgets.QTableWidgetItem(choice.comment)
participant_item.setData(Qt.ItemDataRole.UserRole, choice.id)
table.setItem(row, 0, participant_item)
table.setItem(row, 1, priority_item)
table.setItem(row, 2, secondary_item)
table.setItem(row, 3, status_item)
table.setItem(row, 4, comment_item)
table.setSortingEnabled(True)
table.resizeColumnsToContents()