Hello,
I am finding it difficult to display retrieved photo varbinary data as a photo (an image). I have a qtablewidget where the retrieved data are stored. The varbinary data gets displayed there. I am coding in Python, managing my database with Microsoft SQL, pyodbc
I have a qformLayout below it where I append the data of the qTablewidget to. Now in the qformlayout, I want the photo to display, not the varbinary text. How do I go about it?
NOTE: I successfully retrieved my all the records and append them in their respective form cell when highlighted, my challenge is displaying the retrieved varbinary data as an image, not byte
What I have tried:
Here are some of the codes I have tried:
itemList.append(self.passlb)
for row in rows:
for col in range(self.tab.columnCount()):
itemArray = self.tab.item(row, col)
text = "" if itemArray is None else itemArray.text()
if (col == 14):
itemList[12].open('rb')
passlb = the passport photograph label i.e QLabel("Passport photo")
in my database table, the passport is in column 14, in my qformlayout, the passport is appended in row 12