select row from qtableview
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..
table->model()->data(table->model()->index(0,i)).toString(); this works!