版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。版权
Qt专栏收录该内容
72 篇文章1 订阅
订阅专栏
不同于其它控件的text()函数,QText Edit获取文本的函数为toPlainText()。QString strTxtEdt = ui->textEdit->toPlainText();
函数原型:
QString QTextEdit::toPlainText() const;
Returns the text of the text edit as plain text.
Note: Getter function for property plainText.