Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Showcase
  4. QtQuickAutofill: password manager autofill for Qt Quick fields on Android and iOS
Qt 6.12 LTS is out! See what's new in the release blog

QtQuickAutofill: password manager autofill for Qt Quick fields on Android and iOS

Scheduled Pinned Locked Moved Showcase
2 Posts 2 Posters 60 Views 2 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.
  • J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote last edited by
    #1

    Hi everyone,
    QtQuick's text fields don't work with system password managers (Google Password Manager, iCloud Keychain, 1Password, ...), because the platform doesn't know which field is the username and which is the password. There's an open ticket for it (QTBUG-114578), but no API yet, so I wrote a small library as a workaround:

    https://github.com/DeiVadder/QtQuickAutofill

    You attach a role to your fields and call commit() after a successful sign-in:

    TextField {
        Autofill.role: Autofill.Username
    }
    TextField {
        echoMode: TextInput.Password
        Autofill.role: Autofill.Password
    }
    // after sign-in succeeded:
    AutofillService.commit()
    

    On iOS it adds the missing textContentType to Qt's input responder at runtime, so the QuickType bar offers saved passwords. On Android an invisible overlay view reports the Qt Quick fields to the autofill framework, and after commit() Android offers to save the credentials.

    This is not a biometric login. Any Face ID or fingerprint prompt while filling comes from the password manager, not from your app.

    So far I've tested it with Qt 6.8 on a Pixel 3 (Android 12) and an iPhone 13. It's experimental and MIT licensed.


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    1 Reply Last reply
    2
    • J.HilkJ J.Hilk marked this topic as a regular topic
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Nice ! Thanks

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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
      • Unsolved