pyqt笔记
显示图片并缩放
import requests
def show_image(self):
rep = requests.get(self.url)
image = QPixmap()
image.loadFromData(req.content)
self.piclabel.setPixmap(image.scaled(self.width, self.height))
查找子部件
self.findChild(QLabel,'objectname')
固定窗口大小
self.setFixedSize(w,h)
self.setFixedHeight(h)
self.setFixedWidth(w)