def foo(self): fmt = QTextCharFormat() fmt.setObjectType(QAbstractTextDocumentLayoutTest.objectType) cursor = self.textEdit.textCursor() cursor.insertText(py3k.unichr(0xfffc), fmt) self.textEdit.setTextCursor(cursor) self.textEdit.close()
def testQCharValid(self): '''QDataStream <<>> QChar - valid''' self.stream.writeQChar(42) res = self.read_stream.readQChar() self.assertEqual(res, py3k.unichr(42))