当前位置:网站首页>Matting function based on pyqt5 - program implementation

Matting function based on pyqt5 - program implementation

2022-06-09 03:55:00 Crazy Beanbag

PyQt yes Qt Framework of the Python Language implementation , Is the most powerful GUI One of the Libraries .PyQt Provides a well-designed collection of window controls , It has more convenient operability . Did you learn VB My classmates will know , Compared with the VB Use , There are more elements in the interface design .

This article is based on PyQt5 Completed matting function , Look at the interface first :

One 、 Interface PicR.ui Refer to how to implement , The program code is as follows :

from PyQt5 import QtCore, QtGui, QtWidgets
import  base64
import os
from return_png import img as retu  #  introduce img Variable , Alias as pdf_cf

class Ui_PicR(object):
    def setupUi(self, PicR):
        tmp = open('return.png', 'wb')  #  Create temporary files 
        tmp.write(base64.b64decode(retu))  #  Put this one Decode the picture , Write to file .
        tmp.close()
        PicR.setObjectName("PicR")
        PicR.setWindowModality(QtCore.Qt.NonModal)
        PicR.setEnabled(True)
        PicR.resize(1400, 814)
        PicR.setMinimumSize(QtCore.QSize(1400, 814))
        PicR.setMaximumSize(
原网站

版权声明
本文为[Crazy Beanbag]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090351277516.html

随机推荐