How do I get the value from QDateEdit in QTableWidget? (Python)
-
I put QDateEdit in side QTableWidget by .setCellWidget() how do I get the value (.date()) of QDateEdit if I already know row and column?
@Mikiqueen
You can't, you have to locate the item you want to look at somehow. Nor do I know why you would not know row/column. Anyway you need either that or a variable you kept for theQDateEditwhen you created it.Oh, sorry
if I already know row and column?
I mis-read. So you do know the row/column. So just as you used
setCellWidget(row, column, widget)to set it usewidget = cellWidget(row, column)to read it back. -
@Mikiqueen
You can't, you have to locate the item you want to look at somehow. Nor do I know why you would not know row/column. Anyway you need either that or a variable you kept for theQDateEditwhen you created it.Oh, sorry
if I already know row and column?
I mis-read. So you do know the row/column. So just as you used
setCellWidget(row, column, widget)to set it usewidget = cellWidget(row, column)to read it back.