Results 1 to 3 of 3

Thread: read text from QPlainTextEdit

  1. #1
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default read text from QPlainTextEdit

    Hi, Im new in Qt and im trying to get the text of a QPlainTextEdit. How can I do this? If it not possible I can use another type like QEditText, but I have the same problem.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: read text from QPlainTextEdit

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: read text from QPlainTextEdit

    you can use this method :
    Qt Code:
    1. toPlainText()
    To copy to clipboard, switch view to plain text mode 
    eg:
    Qt Code:
    1. ui->plainTextEdit->toPlainText();
    To copy to clipboard, switch view to plain text mode 

    if you only want to use simple text edit control,you can use <line edit> or <text edit>.

  4. The following 2 users say thank you to rainspider for this useful post:

    Foul Ole Ron (8th June 2016), pavanbarot (4th November 2010)

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. How can I read from Text Edit
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 5
    Last Post: 5th November 2009, 21:22
  3. QPlainTextEdit text format question
    By vieraci in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 12:19
  4. Replies: 5
    Last Post: 27th May 2009, 12:49
  5. how to read from text edit in QT4
    By iamjayanth in forum Qt Programming
    Replies: 3
    Last Post: 17th October 2008, 12:51

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.