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. Qlist<QSqlRecord> in a Tableview
QtWS25 Last Chance

Qlist<QSqlRecord> in a Tableview

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k 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.
  • J Offline
    J Offline
    jaco87
    wrote on last edited by
    #1

    Hi, I have a Qlist of Qrecord and i want take the structure of QsqlRecord for set up my TableView with the structure of my QsqlRecord.

    now i use this method :
    @this->model = new QSqlQueryModel ();
    model->setQuery("myquery");
    ui->tableView_Dati->setModel(model);@

    th for help

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What you ask is not really clear. A QTableView needs a model like you are using. If you don't want to use a SQL related model then you should either write your own that handles that list or use a QTableWidget.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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