Results 1 to 4 of 4

Thread: QLineEdit and setInputMask

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question QLineEdit and setInputMask

    Hi,

    When I run my program the default text displayed in the field is a zero with 6 spaces behind it instead of "0" (a zero without spaces behind it).(I didn't encounter any errors of any kind)

    What do I need to do to get rid of those spaces?
    Qt Code:
    1. QLineEdit *qleobject = new QLineEdit(this);
    2. qleobject->setInputMask("0000000");
    3. qleobject->setText("0");
    4. qleobject->setAlignment(Qt::AlignRight);
    To copy to clipboard, switch view to plain text mode 


    Uploaded with ImageShack.us
    Last edited by mr_kazoodle; 22nd January 2011 at 20:05.

Similar Threads

  1. Replies: 1
    Last Post: 12th October 2010, 22:20
  2. help with QLineEdit
    By benlyboy in forum Newbie
    Replies: 2
    Last Post: 18th February 2010, 01:39
  3. QLineEdit
    By bismitapadhy in forum Qt Programming
    Replies: 3
    Last Post: 11th August 2009, 08:24
  4. Tab QLineEdit
    By jaca in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2008, 13:01
  5. QLineEdit
    By coderbob in forum Qt Programming
    Replies: 6
    Last Post: 27th February 2008, 12: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.