Solved Make QTablewidget every cells Readonly.
-
How can i make every cell in table as read only?(Rows are dynamic)
Is there any other way than Making them go through a loop(each item setting Flags)??
Also is there a way to check QTablewidget empty or not??(other than item()->text()->isempty()) -
@devKing said in Make QTablewidget every cells Readonly.:
How can i make every cell in table as read only?(Rows are dynamic)
Is there any other way than Making them go through a loop(each item setting Flags)??tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
Also is there a way to check QTablewidget empty or not??(other than item()->text()->isempty())
Not clear if you want to check if the item is empty (
tableWidget->model()->index(row,column).data().isNull()
) or the entire widget (tableWidget->rowCount()>0
) -
Thanks a lot