如何使用PyQt5从URL显示图片?
如果已经尝试过:
from PyQt5.QtGui import QPixmap, QIcon
import urllib.request
url = 'http://www.google.com/images/srpr/logo1w.png'
data = urllib.request.urlopen(url).read()
pixmap = QPixmap()
pixmap.loadFromData(data)
icon = QIcon(pixmap)