Results 1 to 2 of 2

Thread: Problem with mask and validation

  1. #1
    Join Date
    Apr 2006
    Location
    Narvik, NORWAY
    Posts
    9
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Windows

    Default Problem with mask and validation

    This code-excample does not work in Qt 3.2.0

    QLineEdit* le = new QLineEdit( myGroupBox, "le" );

    /*
    .
    .
    setting sizepolizy, size and cursor
    .
    .
    */

    myLayout->addWidget( le, 1, 6 );

    le->setInputMask("999.99");
    le->setValidator(new QDoubleValidator(0.00,100.00,2, le));

    After this inittialization the lineEdit does not take any input at all.
    It is not readonly, and it is enabled.

    (I have tried a number of different variations I could think of.)

    What could the reason be?

  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: Problem with mask and validation

    Get rid of the input mask. It's not needed if you have a validator set.

  3. The following user says thank you to wysota for this useful post:

    gunhelstr (20th April 2006)

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.