'data should be a dictionary.'

def setData(self, data, hideRoot=False):

    self.clear()
    self.buildTree(data, self.invisibleRootItem(), hideRoot=hideRoot)
    self.expandToDepth(3)
    self.resizeColumnToContents(0)
