OK, David Boddie helped clear up my confusion (as did rereading chapter 1 of "Rapid GUI Programming") -- to get from a QString to something I can work on in Python it is only necessary to apply unicode(). Doh! (Facepalm).
BLEEP represents any transformation that the user requires, which is not in Qt's repertoire, hence can only be implemented by taking the document away from QPlainTextEdit, doing the work, and putting the bleeped document back in the widget for display. docAsTextDoc = myPlainTextEdit.document() # probably just a pointer docAsQString = docAsTextDoc.toPlainText() # copy? or just pointer? bleepedDoc = BLEEP( unicode( docAsQString ) ) # data copied both in and out docAsQString = QString( bleepedDoc ) # probably another copy docAsTextDoc.setPlainText( docAsQString ) # probably pointer swap? myPlainTextEdit.setDocument(docAsTextDoc) # probably pointer swap _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt