def initUI(self): self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) # Create widget label = QLabel(self) pixmap = QPixmap("me.jpg") print(pixmap.width(), pixmap.heightMM(), pixmap.height()) label.setPixmap(pixmap) self.resize(pixmap.width(), pixmap.height()) self.show()