Results 1 to 3 of 3

Thread: help about QTextEdit

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy help about QTextEdit

    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

  2. #2
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Re: help about QTextEdit

    thanks.
    tell me the reason to hatmann1944@gmail.com

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: help about QTextEdit

    Because QTextEdit doesnt have a text() function.
    Use QTextEdit::toPlainText()

Similar Threads

  1. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 13:05
  2. QTextEdit, sizeHint, QWidget
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2007, 09:25
  3. Re-implement mouse events of QTextEdit
    By Ankitha Varsha in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2006, 17:55
  4. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 07:03
  5. [QT 4] QTextEdit performance
    By fellobo in forum Qt Programming
    Replies: 8
    Last Post: 6th March 2006, 20:27

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
  •  
Qt is a trademark of The Qt Company.