Displaying Image (in bytes) in PyQt

前端 未结 1 1042
谎友^
谎友^ 2020-12-20 07:19

I need to know how to display an image in bytes in GUI. I am taking an image from google static map API with .content I get the image in bytes like this:

imp         


        
相关标签:
1条回答
  • 2020-12-20 08:16

    You will want to use QPixmap.loadFromData().

    qp = QPixmap()
    qp.loadFromData(my_bytes)
    
    0 讨论(0)
提交回复
热议问题