code: def _setHeaderLabel(self, col, text):
          
          model = self.tree.model()
          item = model.horizontalHeaderItem(col)
          if item:
              item.setText(text)
          else:
              model.setHorizontalHeaderItem(col, QtGui.QStandardItem(text))
docs: Sets the header of column col to text.
              Will increase the number of columns if col is larger than the current number.