Results 1 to 3 of 3

Thread: How to save text from textedit input Widget to a Qstring?

  1. #1

    Default Re: How to save text from textedit input Widget to a Qstring?

    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/1509...light=textedit
    Last edited by Malisha100ka; 14th January 2015 at 16:01.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to save text from textedit input Widget to a Qstring?

    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/
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  3. #3
    Join Date
    Jul 2013
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to save text from textedit input Widget to a Qstring?

    QString QTextEdit::toPlainText();

Similar Threads

  1. Replies: 6
    Last Post: 9th April 2014, 20:19
  2. save line edit text to tabel widget row
    By akhilteja in forum Newbie
    Replies: 3
    Last Post: 24th August 2013, 09:06
  3. How to input Chinese characters in LineEdit or TextEdit ?
    By behlkush in forum Qt Programming
    Replies: 2
    Last Post: 23rd May 2011, 12:26
  4. Disable TextEdit input
    By Splatify in forum Newbie
    Replies: 1
    Last Post: 24th February 2011, 07:43
  5. Qt textedit input method problem. please help!
    By Scott Liu in forum Qt Programming
    Replies: 0
    Last Post: 18th January 2010, 03:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.