hi, try this
@
connect(ui->tableWidget, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(getText()));
// or
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(getText()));
@
and
@
void tableDialog::getText(){
QString text;
text = ui->tableWidget->item(ui->tableWidget->currentRow(), ui->tableWidget->currentColumn())->text();
}
@