You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, August 17th 2015, 7:23am

QSqlQueryModel shows empty table with correct headers

Code:

Source code

1
2
3
4
5
6
7
8
9
10
11
QSqlQueryModel *model = new QSqlQueryModel;
QSqlQuery query;
query.exec("{CALL syllabi_output}");

model->setQuery(query);
ui->tableView_4->setModel(model);

//debug
query.first();
qDebug() << query.value(0).toString();
//debug

Debug shows the correct values though.