In PyQGIS design tablewidget, I have set table widget to be read-only and when I select particular,it is didn't read that row?
self.dlg.ui.tableWidget.item(row, 1).setFlags(Qt.NoItemFlags)
unable to select rows in table widget,to read datas.
In PyQGIS design tablewidget, I have set table widget to be read-only and when I select particular,it is didn't read that row?
self.dlg.ui.tableWidget.item(row, 1).setFlags(Qt.NoItemFlags)
unable to select rows in table widget,to read datas.
You just have to use bitwise operations to deny the flag Qt.ItemIsEditable
it = self.dlg.ui.tableWidget.item(row, 1)
it.setFlags(it.flags() & ~Qt.ItemIsEditable)