void QPlainTextEdit::setDocument ( QTextDocument * document )
Makes document the new document of the text editor.
The parent QObject of the provided document remains the owner of the object. If the current document is a child of the text editor, then it is deleted.
The document must have a document layout that inherits QPlainTextDocumentLayout (see QTextDocument::setDocumentLayout()).
See also document().
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ui.PlainCmd->setDocument(QTextDocument::setDefaultTextOption(QTextOptio(Qt::AlignCenter)));
如何写,好像不行啊!
ui.PlainCmd(QPlainTextEdit控件名称)