Results 1 to 4 of 4

Thread: QLineEdit

  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post QLineEdit

    hi,
    I want to find the length of the text in QLineEdit.
    how to get that?
    (It should work similar to linelength function in MFC)

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QLineEdit

    J-P Nurmi

  3. #3
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: QLineEdit

    Well, if say the name of your QLineEdit is lineEdit, you would use this:
    Qt Code:
    1. lineEdit.text().length();
    To copy to clipboard, switch view to plain text mode 

    If you get errors in this line, try replacing the dots with a pointer(->)
    HTH!

    ~codeslicer

  4. #4
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit

    Thanx.Its working

Similar Threads

  1. how to get last character of QLineEdit
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 16:38
  2. closeEditor() not always closing QLineEdit
    By mclark in forum Qt Programming
    Replies: 8
    Last Post: 27th November 2007, 01:44
  3. Problem Euro Sign with QLineEdit
    By Kubil in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2007, 04:56
  4. QValidator, regular expressions and QLineEdit
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 01:25
  5. a box around QLineEdit?
    By GreyGeek in forum Qt Tools
    Replies: 13
    Last Post: 8th February 2006, 15:40

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.