Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView password
Qt 6.11 is out! See what's new in the release blog

QTableView password

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gatz
    wrote on last edited by
    #1

    Hello,

    I'm using QSqlTableModel with QTableView to display users
    There is a way to make the password hash appear like 6 asterix, and on save to hash the new value?
    I keep searching but I can't find anything.

    Thank you

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I think you need to use a delegate to control how it's viewed and edited.
      http://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html

      Does this with the stars.
      It's sort of the same you want as I assume hash is a string but you want to view it
      as something else. and when saved something else than standard should happen.

      1 Reply Last reply
      1
      • G Offline
        G Offline
        gatz
        wrote on last edited by
        #3

        yes, is kind of what I'm looking for. Thanks

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved