def METHOD_NAME(self, label, node_id):
    item = QtGui.QStandardItem(label)
    item.setToolTip(node_id)
    metrics = QtGui.QFontMetrics(item.font())
    if hasattr(metrics, 'horizontalAdvance'):
        width = metrics.horizontalAdvance(item.text())
    else:
        width = metrics.width(item.text())
    width *= 1.5
    item.setSizeHint(QtCore.QSize(width, 20))
    self.model().appendRow(item)
    self.selectionModel().setCurrentIndex(
        self.model().indexFromItem(item),
        QtCore.QItemSelectionModel.ClearAndSelect)