from PyQt5.Qt import *
import sys
import math
app=QApplication(sys.argv)
win=QWidget()
win.setWindowTitle("QLineEdit-文本输出模式-API")
win.setWindowIcon(QIcon("D:\ICO\ooopic_1543493498.ico"))
win.resize(500,500)
le1=QLineEdit(win)
le1.move(100,100)
#le1.setEchoMode(QLineEdit.Password)#设置显示内容为密文
#le1.setEchoMode(QLineEdit.NoEcho)#正常显示
le1.setEchoMode(QLineEdit.PasswordEchoOnEdit)#设置输入时显示明文,焦点离开后显示密文
le2=QLineEdit(win)
le2.move(100,150)
bu=QPushButton(win)
bu.move(100,200)
bu.setText("复制")
bu.setIcon(QIcon("D:\ICO\ooopic_1543582998.ico"))
bu.clicked.connect(lambda :le2.setText(le1.text()))
win.show()
sys.exit(app.exec_())