PDA

View Full Version : How to save text from textedit input Widget to a Qstring?



Malisha100ka
14th January 2015, 16:01
From lineEdit i'm doing like

QString bla;
bla=ui->nameLineEdit->text();

but when i try with textEdit there is no function "text()"

is there some other way to do it or?

i whanna to save it to my sql db....

Added after 20 minutes:

I found it!!

http://www.qtcentre.org/threads/15091-help-about-QTextEdit?highlight=textedit

ChrisW67
14th January 2015, 20:11
Do yourself a favour and learn where the Qt documentation is. You can find it:

By clicking the Help tool in the left of Qt Creator
By pressing F1 when your cursor is in a class name or object in your code in Qt Creator
By pressing Ctrl-k then typing ? And a class name in Qt Creator
By opening the standalone Qt Assistant
By visiting the online documentation http://doc.qt.io/qt-5/

maxpyne
16th January 2015, 19:34
QString QTextEdit::toPlainText();