Qt 6.11 is out! See what's new in the release
blog
Read from tableview
General and Desktop
3
Posts
2
Posters
2.1k
Views
1
Watching
-
How i can read data, from tableview
my code
@model->setHeaderData(0, Qt::Horizontal, QObject::tr("Subject"));
model->setHeaderData(1, Qt::Horizontal, QObject::tr("Sender"));
model->setHeaderData(2, Qt::Horizontal, QObject::tr("Date"));
model->insertRow(0);
model->insertRow(0);
model->insertRow(0);
ui->tableView->setModel(model);@
from 1 column 1 row and 3 column 3 row -
http://screenshooter.net/8431151/onjkjsj <- screenshoot
@edited all
now i reading by this
QString qs = model ->data(model->index(0, 0),Qt::DisplayRole).toString();
ui->label->setText(qs);
and adding to last row by this
@model->insertRow(model ->rowCount());
model->setData(model->index(model ->rowCount()-1, 0),ui->comboBox->currentText());@
ty for trying to help me