Results 1 to 20 of 20

Thread: how to mask the lineEdit text with asterisks for password entry?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to mask the lineEdit text with asterisks for password entry?

    Repeating yourself will not change the outcome. Doing something to try to help yourself might.

    Here is the complete, small, test case you could have written to confirm the behaviour:
    Qt Code:
    1. #include <QApplication>
    2. #include <QLineEdit>
    3. #include <QDebug>
    4.  
    5. int main(int argc, char **argv) {
    6. QApplication app(argc, argv);
    7. l.setEchoMode(QLineEdit::Password);
    8. l.show();
    9. qDebug() << "Should see dots" << QString(5, QChar(0x25CF)) << QString(5, QChar(0x2022));
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    Does it fail with this?

    If not then the problem in your program is external to the QLineEdit.
    Have you applied a style sheet? Is the text/foreground colour white?
    Does your font have a glyph for Unicode code points U+25CF or U+2022 because these are selected in preference to '*' which is the fallback option.
    Last edited by ChrisW67; 6th February 2014 at 04:47. Reason: updated contents

  2. The following user says thank you to ChrisW67 for this useful post:

    prasad1001 (7th February 2014)

Similar Threads

  1. Replies: 7
    Last Post: 5th February 2014, 11:20
  2. how to get the text from a LineEdit using QT??
    By Soumya Somasekhar Ram in forum Qt Programming
    Replies: 11
    Last Post: 11th September 2013, 13:43
  3. reading the latest entry text from QplaintextEdit
    By PHANI in forum Qt Programming
    Replies: 3
    Last Post: 6th February 2012, 11:30
  4. QLineEdit shadow text disappear on first entry
    By dentharg in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2008, 17:40

Tags for this Thread

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.