File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ def add_child(self, child):
1616 self .children .append (child )
1717 self .addChild (child )
1818
19+ def selectAll (self ):
20+ self .setSelected (True )
21+ for child in self .children :
22+ child .selectAll ()
23+
1924 def rename (self , textedit ):
2025 text = textedit .value
2126 self .setText (0 , text )
@@ -138,6 +143,12 @@ def __init__(self, parent):
138143 self .setSelectionMode (QAbstractItemView .ExtendedSelection )
139144 self .header ().setVisible (False )
140145 self .setIndentation (10 )
146+
147+ def selectAll (self ):
148+ item = self .invisibleRootItem ()
149+ for i in range (self .invisibleRootItem ().childCount ()):
150+ child = item .child (i )
151+ child .selectAll ()
141152
142153 # def mousePressEvent(self, event):
143154 # item = self.indexAt(event.pos())
You can’t perform that action at this time.
0 commit comments