我正在使用Qlabel(PyQt4)在我的应用程序中显示图像。当应用程序第一次渲染图像时,图像看起来失真了。但是第二次以后(在关闭窗口并重新打开后),图像显示没有失真。如何避免图像第一次显示时的失真?你知道吗
代码段:
pixmap = QtGui.QPixmap(_fromUtf8(image))
scaledPixmap = pixmap.scaled(self.wCam0.ui.lblImage.size(), QtCore.Qt.IgnoreAspectRatio, QtCore.Qt.FastTransformation)
self.wCam0.ui.lblImage.setPixmap(scaledPixmap)
在上面的片段中,自身.wCam0.ui.L限制是Qlabel对象,image是需要显示的图像的位置/路径。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐