PDA

View Full Version : help about QTextEdit



hatmann1944
28th July 2008, 17:47
i am a beginner of qt
qt4 + ubuntu
use the qdevelop to program.
code:
#include <QtGui/QTextEdit>
.....
QString ss = textEdit->text();//textEdit is a object of QTextEdit
......

but why the complier appear this error:
error: ‘class QTextEdit’ has no member named ‘text’


best regards

hatmann1944
28th July 2008, 17:49
thanks.
tell me the reason to hatmann1944@gmail.com

aamer4yu
28th July 2008, 18:36
Because QTextEdit doesnt have a text() function.
Use QTextEdit::toPlainText() :)