[Interest] Best way to implement a line edit with breaks

Scott Bloom scott at towel42.com
Wed Apr 23 07:53:21 CEST 2025


That works well when it's 1 or 2, even 4 with an IP address.  But I'm looking for a widget that would scale a bit better

~Scott
________________________________
From: coroberti <coroberti at gmail.com>
Sent: Tuesday, April 22, 2025 9:34:46 PM
To: Scott Bloom <scott at towel42.com>
Cc: interest at qt-project.org <interest at qt-project.org>
Subject: Re: [Interest] Best way to implement a line edit with breaks

It might be arranged as a grid layout with an array of QLineEdits.
Focus could be moved by some logic using the index.

jm2c

Kind regards,
Robert Iakobashvili
............................


On Wed, 23 Apr 2025 at 6:35 Scott Bloom <scott at towel42.com<mailto:scott at towel42.com>> wrote:

Over the years this has come up to my a couple of times, and I wanted to get the hive’s opinion



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









_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20250423/8d430025/attachment.htm>


More information about the Interest mailing list