hi ..
i want to get cell content from table view (ui->tableView)
how can i do that ??
hi ..
i want to get cell content from table view (ui->tableView)
how can i do that ??
Not by posting twice
Get the index of the cell (e.g. QAbstractItemView::currentIndex()) and then use the data function to receive the content. (see QModelIndex::data())
You just have to combine the two functions:Qt Code:
QAbstractItemModel *model = ui->tableView->model(); // if you don't have a class wide pointer to your model; if (!model) return; if(!index.isValid) return; qDebug() << index.data().toString();To copy to clipboard, switch view to plain text mode
tinysoft (19th August 2010)
great thanks !
Bookmarks