def strCount(self):
from importby import com
import re
find=self.findx.findlineEdit.text()
main=self.MAILextEdit.toPlainText()
indexfind=self.findx.findlineEdit.text().size()
index=self.MAILextEdit.toPlainText().size()
if self.MAILextEdit.find(find,QTextDocument.FindBackward):
self.MAILextEdit.setStyleSheet("QTextEdit{color:red}")
self.findx.countxiangtong.setText(
‘{0}‘.format(unicode(list(com(main)))))
else:
self.findx.countxiangtong.setText(u‘未找到‘)
self.MAILextEdit.setStyleSheet("QTextEdit{color:black}")
if index==indexfind-1:
QMessageBox.information(self,‘T‘,‘tt‘)
ext1.trimmed().isEmpty()#判断是否空
时间: 2024-10-10 12:34:45