Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
select row from qtableview
Bazelboday last edited by Bazelboday
hello, i have a problem, here is the code that works fine :
QSqlQueryModel *model = new QSqlQueryModel(table);
after that i'm trying to read data from second column:
QModelIndexList indexlist = table->selectionModel()->selectedIndexes();
qDebug()<< "pls work" << indexlist.count() ;
and indexlist.count() is zero, but my table have some data, can someone suggest anything? sry for my eng and thanks in advance!i'm trying to solve this whole day..
Bazelboday last edited by
table->model()->data(table->model()->index(0,i)).toString(); this works!