from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
import sys
app = QApplication(sys.argv)
window = QWidget()
hbox = QHBoxLayout(window)
# 设置标签图片
lable = QLabel()
lable.setPixmap(QPixmap('./img/window.png').scaled(100, 100))
hbox.addWidget(lable)
window.show()
sys.exit(app.exec_())
运行结果: