Qlist<QSqlRecord> in a Tableview



  • 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


  • Lifetime Qt Champion

    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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.