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. Phone number formatting?
Qt 6.11 is out! See what's new in the release blog

Phone number formatting?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 1.5k 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.
  • xopheriraX Offline
    xopheriraX Offline
    xopherira
    wrote on last edited by
    #1

    Is there a widget, or way to have a phone number formatted as user is typing in the field? I would like the user to start typing and have it automatically enter the ( ) and - for a telephone number. I know this can be done brute force but is there an easier Qt way. Thanks

    1 Reply Last reply
    0
    • kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      Use a regular QLineEdit with an appropriate input mask.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      4

      • Login

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