0

I have QTableWidget with specific row and column. When I click on empty cell a text opens and let user to write on cell. Is there any way to avoid this situation, I mean, to avoid adding text on empty cell?

UPDATE: I added this part to slot of cellclick(), but empty cells are yet editable,

QTableWidgetItem *item = filesTable->item(row, column);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);

Is there any way to force empty cells to be read-only?

cbuchart
  • 10,847
  • 9
  • 53
  • 93
Ss.unix
  • 43
  • 8
  • Possible duplicate of [How to make a column in QTableWidget read only?](http://stackoverflow.com/questions/2574115/how-to-make-a-column-in-qtablewidget-read-only) – Steeve Feb 28 '17 at 10:32
  • @Steeve , I updated my question according the link you mentianed. – Ss.unix Feb 28 '17 at 11:27

0 Answers0