<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setData(self, index, value, role=QtCore.Qt.EditRole):
 """Set the data of the given index to value :param index: the index to set :type index: :class:`QtCore.QModelIndex` :param value: the value to set :param role: the role, usually edit role :type role: :data:`QtCore.Qt.ItemDataRole` :returns: True, if successfull, False if unsuccessfull :rtype: :class:`bool` :raises: None """

        if not index.isValid():
            return False
        item = index.internalPointer()
        r = item.set_data(index.column(), value, role)
        if r:
            self.dataChanged.emit(index, index)
        return r