I do not know enough Python to give you code, but since this sounds like a homework assignment you should write the code yourself. This is what you need to do:

- connect the QTableWidget::itemSelectionChanged() signal to a slot in your class

- in that slot, call QTableWidget::selectedItems(). This will give you a list of the QTableWidgetItem pointers that are the selection. Since you are selecting the entire row, then this will be a list of all of the cells in that row.

- pick the QTableWidgetItem for the column you want and use QTableWidgetItem::text() to retrieve the QString.

- call QLineEdit::setText()