sleepyboy_x素人约会457部187Gmyfans付费内容超值珍藏
myfans博主sleepyboy_x独家付费内容合集,收录457部素人约会实录。...
2026-01-20
QLineEdit控件与回显模式

EchoMode()方法用来设置回显示模式,有下列4种回显模式。
代码如下:
import sysfrom PyQt5.QtWidgets import QApplication,QWidget,QLineEdit,QFormLayoutclass QLineEditDemo(QWidget): def __init__(self): super().__init__() self.setupUI() def setupUI(self): # 创建4个演示用的QLineEdit self.lineEdit_1 = QLineEdit(self) self.lineEdit_2 = QLineEdit(self) self.lineEdit_3 = QLineEdit(self) self.lineEdit_4 = QLineEdit(self) # 设置placehoder self.lineEdit_1.setPlaceholderText("normal") self.lineEdit_2.setPlaceholderText("noEcho") self.lineEdit_3.setPlaceholderText("password") self.lineEdit_4.setPlaceholderText("passwordEchoOnEdit") # 设置回显示模式 self.lineEdit_1.setEchoMode(QLineEdit.Normal) self.lineEdit_2.setEchoMode(QLineEdit.NoEcho) self.lineEdit_3.setEchoMode(QLineEdit.Password) self.lineEdit_4.setEchoMode(QLineEdit.PasswordEchoOnEdit) # 创建一个formLayout self.formLayout = QFormLayout() self.formLayout.addRow("normal",self.lineEdit_1) self.formLayout.addRow("noEcho", self.lineEdit_2) self.formLayout.addRow("password", self.lineEdit_3) self.formLayout.addRow("passwordEchoOnEdit", self.lineEdit_4) self.setLayout(self.formLayout)if __name__ == '__main__': app = QApplication(sys.argv) mainWindow = QLineEditDemo() mainWindow.show() sys.exit(app.exec_())
以上内容就是为大家推荐的qlineedit获取内容数字(点击按钮qlineedit获取内容)最佳回答,如果还想搜索其他问题,请收藏本网站或点击搜索更多问题
内容来源于网络仅供参考版权声明:所有来源标注为小樱知识网www.xiaoyin02.com的内容版权均为本站所有,若您需要引用、转载,只需要注明来源及原文链接即可。
本文标题:qlineedit获取内容数字(点击按钮qlineedit获取内容)
本文地址:https://www.xiaoyin02.com/shcs/97309.html
相关文章
热点文章
2021年独生子女补贴新政策是真的吗(独生子女证有有效期吗)
2021年国庆节阅兵仪式几点开始几点结束(2021年国庆节还有阅兵吗)
鼠目寸光一点红是什么生肖动物(鼠目寸光一点红)指什么生肖,紧密
k0到k9的玩法大全(强制gc的玩法和注意事项)
入土为安是什么生肖《入土为安》打一个生肖动物,词语解释
浙江12月底全面停工是真的吗(浙江什么时候放假停工)
如何做t(t怎么把p做哭)
北京口碑最差的三甲医院(北京301医院最擅长什么)