getting data from tablewidget
Solved
General and Desktop
-
Hi All,
Still new and learning so hope someone can help.
I have a QTablewidget which I have filled with data. When I double click on a row in the tablewidget I would like to get particular data for example the data in cell (1) and cell(5).
how can i Do this .
thank you -
Hi All,
Still new and learning so hope someone can help.
I have a QTablewidget which I have filled with data. When I double click on a row in the tablewidget I would like to get particular data for example the data in cell (1) and cell(5).
how can i Do this .
thank you -
@JonB
I posted a new Topic :) .
So it's not the same operation .What i need is when i clicked on row , i get some particular data . Not those which i clicked on .
I hope that my question was clear . -
QObject::connect(tableWidget,&QTableWidget::cellDoubleClicked,[=](int row, int column){ QTableWidgetItem *cell1 = tableWidget->item(row,1); QTableWidgetItem *cell5 = tableWidget->item(row,5); QVariant myData1 = cell1->data(Qt::DisplayRole); QVariant myData5 = cell5->data(Qt::DisplayRole); qDebug() << myData1 << myData5; });