File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,13 @@ bool Label::isReadOnly() const
350350 return mProperties ->isReadOnly ();
351351}
352352
353+ void Label::contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
354+ {
355+ // TODO: https://qt-project.atlassian.net/browse/QTBUG-88309#icft=QTBUG-88309
356+ // Just remove this Label::contextMenuEvent override when upgrading to Qt >= 5.15.3
357+ event->accept ();
358+ }
359+
353360void Label::focusOutEvent (QFocusEvent *event)
354361{
355362 if (event->reason () != Qt::PopupFocusReason) {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class Label : public QGraphicsTextItem, public LabelInterface
7979 void mousePressEvent (QGraphicsSceneMouseEvent *event) override ;
8080 void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override ;
8181 void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override ;
82-
82+ void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override ;
8383 void focusOutEvent (QFocusEvent *event) override ;
8484 void keyPressEvent (QKeyEvent *event) override ;
8585
You can’t perform that action at this time.
0 commit comments