Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlQueryModel shows empty table with correct headers.

QSqlQueryModel shows empty table with correct headers.

Scheduled Pinned Locked Moved General and Desktop
qt5.4sqlodbcqsqlqueryqsqlquerymodel
1 Posts 1 Posters 966 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Charlie42
    wrote on 17 Aug 2015, 06:13 last edited by Charlie42
    #1

    Code:

    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.

    1 Reply Last reply
    0

    1/1

    17 Aug 2015, 06:13

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved