Results 1 to 2 of 2

Thread: QSqlQueryModel shows empty table with correct headers

  1. #1
    Join Date
    Jul 2015
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default QSqlQueryModel shows empty table with correct headers

    Code:

    Qt Code:
    1. QSqlQuery query;
    2. query.exec("{CALL syllabi_output}");
    3.  
    4. model->setQuery(query);
    5. ui->tableView_4->setModel(model);
    6.  
    7. //debug
    8. query.first();
    9. qDebug() << query.value(0).toString();
    10. //debug
    To copy to clipboard, switch view to plain text mode 

    Debug shows the correct values though.

  2. #2
    Join Date
    Apr 2021
    Posts
    6
    Qt products
    Qt5

    Default Re: QSqlQueryModel shows empty table with correct headers

    Do you have more src (git repo) to reproduce it?

Similar Threads

  1. Creating diagonal table headers
    By kubark42 in forum Qt Programming
    Replies: 1
    Last Post: 11th September 2013, 14:19
  2. Multi-table editable QSqlQueryModel
    By i92guboj in forum Qt Programming
    Replies: 2
    Last Post: 20th August 2013, 13:04
  3. Replies: 3
    Last Post: 3rd October 2011, 09:08
  4. Replies: 0
    Last Post: 29th April 2011, 10:02
  5. How to make table headers with custom background?
    By kremuwa in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2010, 17:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.