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 <corobe...@gmail.com>
Sent: Tuesday, April 22, 2025 9:34:46 PM
To: Scott Bloom <sc...@towel42.com>
Cc: interest@qt-project.org <interest@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 
<sc...@towel42.com<mailto:sc...@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@qt-project.org<mailto:Interest@qt-project.org>
https://lists.qt-project.org/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to