pyqt添加图片作为资源文件

1.New resource file *.qrc in QT designer Resource Browser.

2.Add picture in resource file.

3.use picture in Qlabel->pixmap

4.generated picture_rc.py from picture.qrc

pyrcc5 picture.qrc -o picture_rc.py

 

other file use picture resource like as:

splash = QtWidgets.QSplashScreen(QtGui.QPixmap(":/background/startBackground.png"))

posted @ 2021-06-15 10:14  coral_sea  阅读(368)  评论(0)    收藏  举报