Results 1 to 11 of 11

Thread: how can I find number of lines in QTextedit ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    25
    Thanks
    4
    Qt products
    Qt4

    Default how can I find number of lines in QTextedit ?

    I need make a loop which will be making until end of QTextEdit so I need know hom many lines somebody wrote in QTextEdit.

    I tried:
    Qt Code:
    1. for(int i=0; i<textedit.lines(); i++)
    2. {
    3.  
    4. }
    To copy to clipboard, switch view to plain text mode 

    and:
    Qt Code:
    1. for(int i=0; i<textedit.count(); i++)
    2. {
    3.  
    4. }
    To copy to clipboard, switch view to plain text mode 

    but it doesn't work
    Last edited by jpn; 29th July 2008 at 10:35. Reason: missing [code] tags

Similar Threads

  1. problems installing Qt opensource with msvc2008 support
    By odin1985 in forum Installation and Deployment
    Replies: 6
    Last Post: 24th May 2008, 09:06
  2. How to retrieve lines from QTextEdit -- easy way?
    By macias in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 15:44
  3. QTextEdit: how to get lines?
    By claudio in forum Qt Programming
    Replies: 2
    Last Post: 15th July 2007, 21:08
  4. Line Number - QTextEdit...???
    By deepusrp in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2007, 16:34
  5. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

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.