Disable text interaction instead

This commit is contained in:
Roy Nieterau 2025-11-17 14:55:23 +01:00
parent 1c25e35777
commit 82128c30c5

View file

@ -211,7 +211,12 @@ class ContextCardWidget(CardWidget):
icon_widget = PublishPixmapLabel(None, self)
icon_widget.setObjectName("ProductTypeIconLabel")
label_widget = QtWidgets.QLabel(CONTEXT_LABEL, self)
label_widget = QtWidgets.QLabel(f"<span>{CONTEXT_LABEL}</span>", self)
# HTML text will cause that label start catch mouse clicks
# - disabling with changing interaction flag
label_widget.setTextInteractionFlags(
QtCore.Qt.NoTextInteraction
)
icon_layout = QtWidgets.QHBoxLayout()
icon_layout.setContentsMargins(5, 5, 5, 5)