It still doesn't work.
I have:
...
int s=tab->currentIndex().row();
int a=model->data(model->index(s,5)).toInt();
...
QTreeView tab;
QStandardItemModel model;
...
int s=tab->currentIndex().row();
int a=model->data(model->index(s,5)).toInt();
...
To copy to clipboard, switch view to plain text mode
Working code, which needs selecting items in 5th column :
...
int a=tab->currentIndex().data().toInt();
...
QTreeView tab;
QStandardItemModel model;
...
int a=tab->currentIndex().data().toInt();
...
To copy to clipboard, switch view to plain text mode
Bookmarks