pyqt5-QPlainTextEdit多行文本框组件

1、介绍

QPlainTextEdit,多行文本框组件。

2、基础使用

setPlaceholderText(self, placeholderText: str)
  • 设置占位文本
 placeholderText(self) -> str 
  • 获取设置的占位文本
setPlainText(self, text: str)
  • 设置纯文本
insertPlainText(self, text: str)
  • 在光标处插入纯文本
appendPlainText(self, text: str)
  • 在末尾追加纯文本
toPlainText(self) -> str 
  • 获取纯文本
appendHtml(self, html: str) 
  • 在末尾追加html
  • 注意,html并不存在setXX、insertXX以及获取的方法

 

posted @ 2023-10-01 01:06  挖洞404  阅读(77)  评论(0编辑  收藏  举报