File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -990,15 +990,15 @@ def dropEvent(self, event):
990
990
991
991
992
992
class ClickableLabel (QLabel ):
993
- clicked = Signal ()
993
+ clicked = Signal (str )
994
994
995
995
def __init__ (self , text = "" , color = "turquoise" , parent = None ):
996
996
super ().__init__ (text , parent )
997
997
self ._default_style = self .styleSheet ()
998
998
self .color = color
999
999
1000
1000
def mousePressEvent (self , event ):
1001
- self .clicked .emit ()
1001
+ self .clicked .emit (self . text () )
1002
1002
1003
1003
def enterEvent (self , event ):
1004
1004
self .setCursor (QCursor (Qt .PointingHandCursor ))
@@ -1077,6 +1077,15 @@ def __init__(self, parent):
1077
1077
1078
1078
self ._build ()
1079
1079
1080
+ @property
1081
+ def labels (self ):
1082
+ labels = []
1083
+ for i in range (self ._layout .count ()):
1084
+ item = self ._layout .itemAt (i )
1085
+ if w := item .widget ():
1086
+ labels .append (w )
1087
+ return labels
1088
+
1080
1089
def _build (self ):
1081
1090
self ._container .setSizePolicy (
1082
1091
QSizePolicy .Fixed , QSizePolicy .Maximum
You can’t perform that action at this time.
0 commit comments