how to make a cell in a QTableWidget read only?
i have the following code defining the gui of my app class Ui (object): def setupUi(): self.tableName = QtGui.QTableWidget(self.layoutWidget_20) self.tableName.setObjectName(_fromUtf8("twHistoricoDisciplinas")) self.tableName.setColumnCount(4) self.tableName.setRowCount(3) and the following code in my app class MainWindow(QtGui.QMainWindow): def __init__(self): self.ui = Ui() self.ui.setupUi(self) self.createtable() #creating a tw cell def cell(self,var=""): item = QtGui.QTableWidgetItem() item.setText(var) return item def createtable(self): rows = self.tableName.rowCount() columns = self