pyqt5 lineEdit设置密码隐藏,删除lineEdit已输入的内容等属性方法

yipeiwu_com6年前Python基础

self.lineEdit.setEchoMode(QLineEdit.Password) 设置密码隐藏

self.lineEdit.setClearButtonEnabled(True) 设置对输入内容的删除提示

self.lineEidt.setFixedSize() 总的设置控件大小

self.lineEdit.setFixedWidth() 设置宽度

self.lineEdit.setFixedHeight() 设置高度

self.lineEidt.setFrame(False) 设置无边框

self.lineEdit.text() 获得文本输入

self.lineEdit.setText() 设置文本

self.lineEdit.clear() 清除输入

self.lineEdit.hide() 设置隐藏

self.lineEidt.show() 设置展示

以上这篇pyqt5 lineEdit设置密码隐藏,删除lineEdit已输入的内容等属性方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持【听图阁-专注于Python设计】。

相关文章

python字符串查找函数的用法详解

python字符串查找函数的用法详解

python字符串查找函数的使用 打开Python开发工具IDLE,新建‘findstr.py'文件,并写代码如下: s ='/ab/bx,.s' print (s.find('/x...

python点击鼠标获取坐标(Graphics)

python点击鼠标获取坐标(Graphics)

使用Python进行图像编程,要使用到Graphics库。下面列举出较常用的代码 from graphics import * #设置画布窗口名和尺寸 win = Graph...

Python使用flask框架操作sqlite3的两种方式

本文实例讲述了Python使用flask框架操作sqlite3的两种方式。分享给大家供大家参考,具体如下: 方式一:raw_sql import sqlite3 from flask...

python sort、sorted高级排序技巧

Python list内置sort()方法用来排序,也可以用python内置的全局sorted()方法来对可迭代的序列排序生成新的序列。 1)排序基础 简单的升序排序是非常容易的。只需要...

浅谈Python_Openpyxl使用(最全总结)

Python_Openpyxl 1. 安装 pip install openpyxl 2. 打开文件 ① 创建 from openpyxl import Workboo...