From 6f3286be4f9727f97a9f2e5080319513046d731f Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 30 Sep 2022 08:10:39 +0200 Subject: [PATCH] Add tooltips to all nodes When labels end up too close to each other, it is hard to read them, this helps. --- birdvisu/visualisation/annotators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/birdvisu/visualisation/annotators.py b/birdvisu/visualisation/annotators.py index c7f9e76..dc6d92b 100644 --- a/birdvisu/visualisation/annotators.py +++ b/birdvisu/visualisation/annotators.py @@ -143,6 +143,7 @@ def create_qgritems(at): shape = QtWidgets.QGraphicsRectItem(-size/2, -size/2, size, size) shape.setBrush(brush) shape.setPos(x, y) + shape.setToolTip(rk) label = QtWidgets.QGraphicsSimpleTextItem(rk, parent=shape) label.setY(size*0.8) # Centering: @@ -168,6 +169,7 @@ def create_qgritems(at): shape = QtWidgets.QGraphicsRectItem(-size/2, -size/2, size, size) shape.setBrush(brush) shape.setPos(x, y) + shape.setToolTip(nk) label = QtWidgets.QGraphicsSimpleTextItem(nk, parent=shape) label.setY(size*0.8) # Centering: