1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtCore, QtGui
>>> app = QtGui.QApplication([])
>>> ui = QtGui.QPlainTextEdit()
>>> ui.show()
>>> ui.setPlainText("QPlainTextEdit is an advanced viewer/editor supporting plain text.")
>>> txt = ui.toPlainText()
>>> txt
PyQt4.QtCore.QString(u'QPlainTextEdit is an advanced viewer/editor supporting plain text.')
>>> ui.appendPlainText("QPlainText uses very much the same technology and concepts as QTextEdit")
>>> txt = ui.toPlainText()
>>> txt
PyQt4.QtCore.QString(u'QPlainTextEdit is an advanced viewer/editor supporting plain text.\nQPlainText uses very much the same technology and concepts as QTextEdit')
>>> |
Partager