diff --git a/plover/gui_qt/machine_options.py b/plover/gui_qt/machine_options.py index d831bbfc6..dcdf49024 100644 --- a/plover/gui_qt/machine_options.py +++ b/plover/gui_qt/machine_options.py @@ -78,7 +78,7 @@ def _format_port(self, index): self._doc.clear() cursor = QTextCursor(self._doc) cursor.setCharFormat(self._device_format) - port_info = index.data(Qt.UserRole) + port_info = index.data(Qt.ItemDataRole.UserRole) if port_info is None: cursor.insertText(index.data(Qt.ItemDataRole.DisplayRole)) return