How can i get the text written in the QTextEdit during run time?
I want to save the text written in the QtextEdit by the user.
6 replies
http://developer.qt.nokia.com/doc/qt-4.8/qtextedit.html#plainText-prop
use the Acces function toPlainText (), which will return what you need.
You have to open a file, write into it. You have the QString from the function toPlainText().
But the easiest way is using QTextDocumentWriter.
How to do this, is even handled in the most basic Getting started Programming with Qt tutorial.
And please, what is so hard to get a combination of textEdit->toHtml() and file->write() or textstream << string yourself? Is it really that hard?
How to do this, is even handled in the most basic Getting started Programming with Qt tutorial.And please, what is so hard to get a combination of textEdit->toHtml() and file->write() or textstream << string yourself? Is it really that hard?
No it is not hard but i have not seen that documentation before, otherwise i would not have asked it.
No it is not hard but i have not seen that documentation before, otherwise i would not have asked it.
Sorry, but you do not give the impression that you read documentation at all. A quick scan on QTextEdit‘s list of member functions reveals all that secret sauce in no time.
So it either is too hard for you to find out yourself, or you’re plain stinking lazy and asking in the forum instead of doing your research yourself. I’m undecided which alternative is worse.
Anyways, with your behavior, you’re not going to make yourself friends here that are eager to help you, neither with your toy problems nor if you run into really interesting cases.
You must log in to post a reply. Not a member yet? Register here!




