eric6/E5Gui/E5TreeWidget.py

changeset 8234
fcb6b4b96274
parent 8228
772103b14c18
child 8268
6b8128e0c9d1
equal deleted inserted replaced
8233:bad78a592cc2 8234:fcb6b4b96274
267 """ 267 """
268 Private method to iterate over the child items of the parent. 268 Private method to iterate over the child items of the parent.
269 269
270 @param parent parent item to iterate (QTreeWidgetItem) 270 @param parent parent item to iterate (QTreeWidgetItem)
271 """ 271 """
272 if parent: 272 count = parent.childCount() if parent else self.topLevelItemCount()
273 count = parent.childCount()
274 else:
275 count = self.topLevelItemCount()
276 273
277 for index in range(count): 274 for index in range(count):
278 if parent: 275 itm = parent.child(index) if parent else self.topLevelItem(index)
279 itm = parent.child(index)
280 else:
281 itm = self.topLevelItem(index)
282 276
283 if itm.childCount() == 0: 277 if itm.childCount() == 0:
284 self.__allTreeItems.append(itm) 278 self.__allTreeItems.append(itm)
285 279
286 self.__iterateAllItems(itm) 280 self.__iterateAllItems(itm)

eric ide

mercurial