From 95f4b00e1463cbfd72d8d45568977e192499d5fc Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Thu, 23 May 2019 23:56:53 -0700 Subject: [PATCH] TreeWidget.topLevelItems Python 3 fix --- pyqtgraph/widgets/TreeWidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/TreeWidget.py b/pyqtgraph/widgets/TreeWidget.py index b0ec54c1..8c55ae2f 100644 --- a/pyqtgraph/widgets/TreeWidget.py +++ b/pyqtgraph/widgets/TreeWidget.py @@ -201,7 +201,7 @@ class TreeWidget(QtGui.QTreeWidget): return item def topLevelItems(self): - return map(self.topLevelItem, xrange(self.topLevelItemCount())) + return [self.topLevelItem(i) for i in range(self.topLevelItemCount())] def clear(self): items = self.topLevelItems()