code: def topLevelItems(self):
          
          try:
              for i in xrange(self.topLevelItemCount()):
                  yield self.topLevelItem(i)
          except RuntimeError:
              # can be raised when iterating on a deleted tree widget.
              return
docs: Returns the list of top level nodes for this tree.
          
          :return     [<QtGui.QTreeWidgetItem>, ..]