Hi all,
I used Qlabel to display a image that query MSSQL. The database is currently located in the same computer(1) as the one I used to program the GUI in Qt. Everything works fine and image displays properly.
However when I tested the deployed exe file in another computer(2) that doesn't have Qt installed. I can access all data from the database but not the JPG images that is suppose to show. Could it be that there are Qt plugins that are needed by computer(2)?
Here is my code for displaying image from MSSQL to QLabel:
QSqlQuery query;
query.exec("SELECT photo FROM dbo.report_img WHERE _Time = '"+ui->img_list->currentItem()->text()+"'");
query.next();
QByteArray image = query.value(0).toByteArray() ;
QPixmap pixmap;
pixmap.loadFromData(image);
ui->image_detail->setPixmap(pixmap);
Thanks for your help
Jeff
Added after 5 minutes:
Fixed. turns out I needed plugins from the imageformat folder on computer(2)!
Bookmarks