Hello to each and everyone, I'm trying to put in a tableview a checkbox which should be linked to a value in the db of SQlite, the program select first a query and insert data into the table but I want to add a column with a checkbox for each record found in the db. How can i add it to the QSqlQueryModel and Qtableview already created by QTcreator?
Thank you so much
This is my code:
Qt Code:
void myClass::on_pushButton_clicked() { Widget conn; conn.connOpen(); qry->prepare("select * from plan where username='"+username_temp+"'"); qry->exec(); model->setQuery(*qry); ui->tableView->setModel(model); conn.connClose(); qDebug() << (model->rowCount()); }To copy to clipboard, switch view to plain text mode
Bookmarks