[PyQt] QTableWidget no editable

Brian Kelley kelley at eyesopen.com
Mon Mar 2 14:20:31 GMT 2009


Before you add a QTableWidgetItem to a cell, call the setFlags function on the item without the ItemIsEditable flag.

For editable:

item.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled )

For not editable;

item.setFlags( QtCore.Qt.ItemIsSelectable |  QtCore.Qt.ItemIsEnabled )




On 3/2/09 9:03 AM, "chrysl666" <chrysl666 at gmail.com> wrote:

please how to meake a QTableWidget cell no Editable ?

thanks for help me !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090302/f9a4ba86/attachment.html


More information about the PyQt mailing list