Results 1 to 3 of 3

Thread: hide text in textedit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2013
    Location
    India
    Posts
    44
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default hide text in textedit

    how to hide text in textedit in qt....

  2. #2
    Join Date
    May 2015
    Posts
    66
    Thanks
    10
    Thanked 17 Times in 17 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: hide text in textedit

    If line edit is an option you can use QLineEdit::SetEchoMode(QLineEdit::NoEcho) which is in general used to hide passwords.

    In QTextEdit the only option is to manually store the text to be hidden somewhere and delete it from textEdit. When you want to show it, paste it back.

  3. #3
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: hide text in textedit

    In QTextEdit the only option is to manually store the text to be hidden somewhere and delete it from textEdit. When you want to show it, paste it back.
    For example:

    Qt Code:
    1. bool QObject::setProperty(const char * name, const QVariant & value)
    2. QVariant QObject::property(const char * name) const
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Text Alignment in a textedit in qt creator
    By aaditya190 in forum Newbie
    Replies: 4
    Last Post: 11th December 2013, 10:00
  2. Help text color in TextEdit
    By tho97 in forum Qt Programming
    Replies: 5
    Last Post: 26th March 2008, 08:47
  3. How to block the textedit'd text to be copied
    By santosh.kumar in forum Qt Programming
    Replies: 2
    Last Post: 2nd November 2007, 10:54
  4. visible text of textedit
    By regix in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2006, 09:02
  5. Replies: 11
    Last Post: 9th March 2006, 09:57

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.