Results 1 to 4 of 4

Thread: [QTextEdit] Delete single lines

  1. #1
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default [QTextEdit] Delete single lines

    Hi there,

    I need to delete some (one or multiple) lines in a QTextEdit. The only thing I found is QTextEdit::clear which deletes all lines, but that's not what I want. I need a more direct access to edit/delete a single line but neither QTextEdit nor QTextDocument seem to provide an interface for that.
    How am I supposed to do that?

  2. #2
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: [QTextEdit] Delete single lines

    Does this link help?

  3. #3
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: [QTextEdit] Delete single lines

    Quote Originally Posted by sedi View Post
    Does this link help?
    Depends. I need to process a lot of text and the link uses functions intended for user interaction to delete the text. Is that efficient? I think it is, though. Thanks!

  4. #4
    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: [QTextEdit] Delete single lines

    It does not use functions for user interaction. It's a correct approach.
    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.


Similar Threads

  1. Single line QTextEdit
    By Arthur in forum Qt Programming
    Replies: 1
    Last Post: 30th August 2010, 21:04
  2. delete a single file from a directory
    By rishiraj in forum Newbie
    Replies: 1
    Last Post: 12th March 2009, 05:46
  3. QString, how to delete new lines
    By raphaelf in forum Newbie
    Replies: 8
    Last Post: 25th June 2008, 12:13
  4. QTextEdit: how to get lines?
    By claudio in forum Qt Programming
    Replies: 2
    Last Post: 15th July 2007, 21:08
  5. space between lines in QTextEdit
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2006, 13:05

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.