PDA

View Full Version : QTextEdit::text()



hazardpeter
5th August 2009, 19:51
Hello, when ever I make a QTextEdit object I can never get it's text to a QString nor a normal string. In the help pages I got this information that to do what i need we use the QTextEdit::text() method and that doesn't work, i tried a line like this:


//str is a QString
//txt is a QTextEdit

str = txt.text();



Obviously it must be a little more complicated then that.

Thank for now.

spirit
5th August 2009, 22:00
hm, don't understand what you need... but, have you see QTextEdit::toPlainText?

hazardpeter
5th August 2009, 22:13
XD, that was what I has lokking for!!

I can't belive that I saw that method so many times in the help pages and didn't notice it. I guess i has just to tired.

But thank's very very must, lolol