jeudi 7 janvier 2021

QT5 C++ QSqlTableModel display images from sql query saved as blob

Am trying to display a products type table with product name price and image using QSqlTableModel, but can't figure out how to do it

   QSqlQueryModel *model = new QSqlTableModel();
  model->setQuery(query);
  ui->produit_table->setModel(model);

table preview

Aucun commentaire:

Enregistrer un commentaire