OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Set image to QLabel from MySQL database

  • Thread starter Thread starter Nat
  • Start date Start date
N

Nat

Guest
Please help me correct my code for which is suppose to set the image it retrieves from the database. The image does not show in the QLabel. I am using Pyside6.

Code:
binary_data = results['image']
img_data = qtc.QByteArray.fromBase64(binary_data)
image = img_data.data()
self.lb_Picture.setPixmap(qtg.QPixmap(image))
<p>Please help me correct my code for which is suppose to set the image it retrieves from the database. The image does not show in the QLabel. I am using Pyside6.</p>
<pre><code>binary_data = results['image']
img_data = qtc.QByteArray.fromBase64(binary_data)
image = img_data.data()
self.lb_Picture.setPixmap(qtg.QPixmap(image))
</code></pre>
 

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top