[Interest] Best way to implement a line edit with breaks
Scott Bloom
scott at towel42.com
Thu Apr 24 01:08:06 CEST 2025
Yes, however the problem I have is my "mask" is dynamic based on information from the server.
Scott
-----Original Message-----
From: David Ching <dc at dcsoft.com>
Sent: Wednesday, April 23, 2025 16:04
To: interest at qt-project.org
Cc: Scott Bloom <scott at towel42.com>
Subject: RE: Best way to implement a line edit with breaks
Have you considered a QLineEdit with an input mask? IP addresses typically have dashes '-' between the digit groups. The line edit initially appears empty except the dashes appear, inviting the user to type numbers that fill in the space provided between the dashes.
Thanks,
David
> Date: Wed, 23 Apr 2025 03:34:06 +0000
> From: Scott Bloom <scott at towel42.com>
> Subject: [Interest] Best way to implement a line edit with breaks
>
> The "easiest" example is the entry for an IP address, but it could be
> for
any string of numbers (or letters) where there are sub strings in one larger string
>
> For an IP address, you often see 4 smaller line edits. But if there
> are
12 substrings, that becomes a pain to handle.
>
> Ideally Im thinking to present it in a similar fashion to the hex side
> of
hex editor.
>
> Where each "grouping" has a space between them, this of course means a
custom painter etc etc
>
> Any thoughts? Anyone seen a widget similar to what Im asking for?
>
> Scott
More information about the Interest
mailing list