IordanouGiannis
IordanouGiannis

Reputation: 4357

PyQt:How to get contents of selected cell in table widget?

I have a table widget with cells containing strings.I want to select a cell and then pushing a button to get the contents of the cell.

I thought to use tableWidget.currentItem(), but I get a QTableWidgetItem object.

For the button and the table I use QtDesigner.Any tips?Thanks.

Upvotes: 0

Views: 2977

Answers (1)

Blender
Blender

Reputation: 298562

Look at the documentation. It's really useful:

tableWidget.currentItem().text()

Upvotes: 3

Related Questions