PySide6开发-03-QLineEdit
1. 参考
# QtWidgets.pyi
class QLineEdit(PySide6.QtWidgets.QWidget):LeadingPosition : QLineEdit.ActionPosition = ... # 0x0TrailingPosition : QLineEdit.ActionPosition = ... # 0x1Normal : QLineEdit.EchoMode = ... # 0x0NoEcho : QLineEdit.EchoMode = ... # 0x1Password : QLineEdit.EchoMode = ... # 0x2PasswordEchoOnEdit : QLineEdit.EchoMode = ... # 0x3class ActionPosition(Enum):LeadingPosition : QLineEdit.ActionPosition = ... # 0x0TrailingPosition : QLineEdit.ActionPosition = ... # 0x1class EchoMode(Enum):Normal : QLineEdit.EchoMode = ... # 0x0NoEcho : QLineEdit.EchoMode = ... # 0x1Password : QLineEdit.EchoMode = ... # 0x2PasswordEchoOnEdit : QLineEdit.EchoMode = ... # 0x3@overloaddef __init__(self, arg__1:str, parent:Optional[PySide6.QtWidgets.QWidget]=...) -> None: ...@overloaddef __init__(self, parent:Optional[PySide6.QtWidgets.QWidget]=...) -> None: ...@overloaddef addAction(self, action:PySide6.QtGui.QAction) -> None: ...@overloaddef addAction(self, action:PySide6.QtGui.QAction, position:PySide6.QtWidgets.QLineEdit.ActionPosition) -> None: ...@overloaddef addAction(self, arg__1:PySide6.QtGui.QAction) -> None: ...@overloaddef addAction(self, icon:Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], position:PySide6.QtWidgets.QLineEdit.ActionPosition) -> PySide6.QtGui.QAction: ...def alignment(self) -> PySide6.QtCore.Qt.Alignment: ...def backspace(self) -> None: ...def changeEvent(self, arg__1:PySide6.QtCore.QEvent) -> None: ...def clear(self) -> None: ...def completer(self) -> PySide6.QtWidgets.QCompleter: ...def contextMenuEvent(self, arg__1:PySide6.QtGui.QContextMenuEvent) -> None: ...def copy(self) -> None: ...def createStandardContextMenu(self) -> PySide6.QtWidgets.QMenu: ...def cursorBackward(self, mark:bool, steps:int=...) -> None: ...def cursorForward(self, mark:bool, steps:int=...) -> None: ...def cursorMoveStyle(self) -> PySide6.QtCore.Qt.CursorMoveStyle: ...def cursorPosition(self) -> int: ...def cursorPositionAt(self, pos:PySide6.QtCore.QPoint) -> int: ...def cursorRect(self) -> PySide6.QtCore.QRect: ...def cursorWordBackward(self, mark:bool) -> None: ...def cursorWordForward(self, mark:bool) -> None: ...def cut(self) -> None: ...def del_(self) -> None: ...def deselect(self) -> None: ...def displayText(self) -> str: ...def dragEnabled(self) -> bool: ...def dragEnterEvent(self, arg__1:PySide6.QtGui.QDragEnterEvent) -> None: ...def dragLeaveEvent(self, e:PySide6.QtGui.QDragLeaveEvent) -> None: ...def dragMoveEvent(self, e:PySide6.QtGui.QDragMoveEvent) -> None: ...def dropEvent(self, arg__1:PySide6.QtGui.QDropEvent) -> None: ...def echoMode(self) -> PySide6.QtWidgets.QLineEdit.EchoMode: ...def end(self, mark:bool) -> None: ...def event(self, arg__1:PySide6.QtCore.QEvent) -> bool: ...def focusInEvent(self, arg__1:PySide6.QtGui.QFocusEvent) -> None: ...def focusOutEvent(self, arg__1:PySide6.QtGui.QFocusEvent) -> None: ...def hasAcceptableInput(self) -> bool: ...def hasFrame(self) -> bool: ...def hasSelectedText(self) -> bool: ...def home(self, mark:bool) -> None: ...def initStyleOption(self, option:PySide6.QtWidgets.QStyleOptionFrame) -> None: ...def inputMask(self) -> str: ...def inputMethodEvent(self, arg__1:PySide6.QtGui.QInputMethodEvent) -> None: ...@overloaddef inputMethodQuery(self, arg__1:PySide6.QtCore.Qt.InputMethodQuery) -> Any: ...@overloaddef inputMethodQuery(self, property:PySide6.QtCore.Qt.InputMethodQuery, argument:Any) -> Any: ...def insert(self, arg__1:str) -> None: ...def isClearButtonEnabled(self) -> bool: ...def isModified(self) -> bool: ...def isReadOnly(self) -> bool: ...def isRedoAvailable(self) -> bool: ...def isUndoAvailable(self) -> bool: ...def keyPressEvent(self, arg__1:PySide6.QtGui.QKeyEvent) -> None: ...def keyReleaseEvent(self, arg__1:PySide6.QtGui.QKeyEvent) -> None: ...def maxLength(self) -> int: ...def minimumSizeHint(self) -> PySide6.QtCore.QSize: ...def mouseDoubleClickEvent(self, arg__1:PySide6.QtGui.QMouseEvent) -> None: ...def mouseMoveEvent(self, arg__1:PySide6.QtGui.QMouseEvent) -> None: ...def mousePressEvent(self, arg__1:PySide6.QtGui.QMouseEvent) -> None: ...def mouseReleaseEvent(self, arg__1:PySide6.QtGui.QMouseEvent) -> None: ...def paintEvent(self, arg__1:PySide6.QtGui.QPaintEvent) -> None: ...def paste(self) -> None: ...def placeholderText(self) -> str: ...def redo(self) -> None: ...def selectAll(self) -> None: ...def selectedText(self) -> str: ...def selectionEnd(self) -> int: ...def selectionLength(self) -> int: ...def selectionStart(self) -> int: ...def setAlignment(self, flag:PySide6.QtCore.Qt.Alignment) -> None: ...def setClearButtonEnabled(self, enable:bool) -> None: ...def setCompleter(self, completer:PySide6.QtWidgets.QCompleter) -> None: ...def setCursorMoveStyle(self, style:PySide6.QtCore.Qt.CursorMoveStyle) -> None: ...def setCursorPosition(self, arg__1:int) -> None: ...def setDragEnabled(self, b:bool) -> None: ...def setEchoMode(self, arg__1:PySide6.QtWidgets.QLineEdit.EchoMode) -> None: ...def setFrame(self, arg__1:bool) -> None: ...def setInputMask(self, inputMask:str) -> None: ...def setMaxLength(self, arg__1:int) -> None: ...def setModified(self, arg__1:bool) -> None: ...def setPlaceholderText(self, arg__1:str) -> None: ...def setReadOnly(self, arg__1:bool) -> None: ...def setSelection(self, arg__1:int, arg__2:int) -> None: ...def setText(self, arg__1:str) -> None: ...@overloaddef setTextMargins(self, left:int, top:int, right:int, bottom:int) -> None: ...@overloaddef setTextMargins(self, margins:PySide6.QtCore.QMargins) -> None: ...def setValidator(self, arg__1:PySide6.QtGui.QValidator) -> None: ...def sizeHint(self) -> PySide6.QtCore.QSize: ...def text(self) -> str: ...def textMargins(self) -> PySide6.QtCore.QMargins: ...def timerEvent(self, arg__1:PySide6.QtCore.QTimerEvent) -> None: ...def undo(self) -> None: ...def validator(self) -> PySide6.QtGui.QValidator: ...
2. 代码
简单使用下QLineEdit类中的方法。
方法 | 作用 |
---|---|
setReadOnly(self, arg__1:bool) | 设置只读 |
setText(self, arg__1:str) | 设置内容 |
text(self) | 获取内容 |
import sys
from PySide6.QtWidgets import QApplication, QMainWindow
from ui_test import Ui_MainWindowclass MainWindow(QMainWindow):def __init__(self):super().__init__()self.ui = Ui_MainWindow()self.ui.setupUi(self)self.ui.pushButton.clicked.connect(self.pushbuttonSlot)self.ui.lineEdit.setReadOnly(True)self.ui.lineEdit.setText("QLineEdit")def pushbuttonSlot(self):print(self.ui.lineEdit.text())if __name__ == "__main__":app = QApplication(sys.argv)mainwindow = MainWindow()mainwindow.show()sys.exit(app.exec())
PySide6开发-03-QLineEdit相关推荐
- 用python3.9和pyside6开发的客服辅助软件,竟然花了我1个星期,不过收获很大
宣传自己的业务或者产品,很多客户问的问题都是一样的,因此回复通常也是千篇一律.因此,用pyside6开发了一个客服辅助工具,看似简单,却花了不少时间,期间解决了好多技术问题,感觉收获满满.最后的成品如 ...
- PySide6开发环境
文章目录 开发环境 Anaconda安装 PySide6安装 验证PySide6安装是否成功 安装Qt Creator4.14 体验一下搭建的环境 Windows环境下常见错误 开发环境 操作系统:W ...
- 微信公众号开发 [03] 结合UEditor实现图文消息群发功能
0.写在前面的话 如何实现微信平台后台管理中的,图文消息发送功能? 大概的过程如下: 通过类似表单的形式,将文章各部分内容提交到后台,封装成一个实体类,并持久化到数据库中 需要推送的时候,将不同的文章 ...
- 【初探移动前端开发03】jQuery Mobile(上)
前言 到目前为止,我打了几天酱油了,这几天落实了工作,并且看了一部电视连续剧(陈道明-手机),我很少看连续剧了,但是手机质量很高啊,各位可以看看. 我们今天先学习一下jquery mobile的基础知 ...
- 基于androidx的快速开发框架_Vue企业级优雅实战07框架开发03封装基于MockJS的模拟数据...
预览本文的实现效果: # giteegit clone git@gitee.com:cloudyly/dscloudy-admin-single.git# githubgit clone git@gi ...
- unity超级马里奥2d游戏开发-03瓦片地图场景搭建
大家好,我是小兵,今天给大家带来Untiy开发超级马里奥游戏的第3课,瓦片地图搭建,如果你想查看完整的教程,请访问我的个人博客geekape.net. 前两节课都没涉及具体的游戏制作,算是一个开胃菜, ...
- pyside6开发-01-PushButton
1. 界面 2. 代码 import sys from PySide6.QtWidgets import QApplication, QMainWindow from ui_test import U ...
- Flutter 实现高仿开眼 APP 的页面开发 03
这是本实战系列的最后一篇文章了,也是本专栏的最后一篇文章.这篇文章将继续上一篇的文章,把剩余的发现页面和社区页面进行开发.以及抽离了一些可复用的业务组件,并且新增加了图片轮播组件.九宫格布局组件等等. ...
- 单片机开发——03工欲善其事必先利其器(AD软件安装破解)
在单片机开发中,有了Keil的程序编程,Protues的模拟仿真,那么问题来了,怎么去进行电路图设计以及硬件调试呢?此刻就必须引入本文的Altium Designer (下文简称AD)安装与破解.在硬 ...
- 【实际开发03】- dto + vo - 先处理 dto , 后处理 vo ( 通常少一注解 )
目录 0. 建议 : 多用组合 , 少用继承 1. @EqualsAndHashCode(callSuper = true) - 解决允许调用父类 2. 序列化 ID : private static ...
最新文章
- 无线数据采集器与计算机系统的连接,WS5、WS6 WiFi无线数据采集器,如何与计算机实现无线远距离采集...
- 故障解决:error while loading shared libraries: libncurses.so.5
- 计算机系统 程序和指令
- css3制作炫酷导航栏效果 转
- Lock锁实现多线程卖票
- linux 设备数 of,linux下devicetree中惯用的of函数
- VS2013创建opencv-2.4.10静态链接库
- scala循环 方法与函数
- php5中使用xslt扩展,.NET_解析在.net中使用XSLT转换xml文档的示例详解,XSL即可扩展的样式表文件。 可 - phpStudy...
- 高瓴张磊:从学渣到投资大佬,也曾多次犯错
- 360顽固木马专杀工具 千万别用
- python operator用法,Python operator.eq()函数与示例
- 继续逼近FLASH效果
- 关于Binder (AIDL)的 oneway 机制
- adc量化单位_高速ADC的关键指标:量化误差、offset/gain error、DNL、INL、ENO...
- Spring当中循环依赖很少有人讲,今天让我们来看看吧
- 【CS231n】五、卷积神经网络简介CNN学习笔记_一只神秘的大金毛_新浪博客
- python统计句子中单词个数_python练习:一行搞定-统计一句话中每个单词出现的个数...
- 【考生说】持之以恒才是胜利的推动器、一周时间通过C认证的同学怎么说
- 【猫项目】微信小程序 后端返回数据解析json