View Single Post
Old 08-12-2025, 11:42 AM   #582
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,957
Karma: 6361444
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by wrCisco View Post
After that, I just had to add a bit coarse solution to the very-long-words-that-wont-wrap problem: I set a minimum width for the window, then in the showEvent of the checkboxes I compute the horizontal advancement of every word and if one is wider than the available width I intersperse every character of that word with zero-width spaces.
Wonderful idea! Then no Item Delegate needed at all. I could use the index.data to store the unedited filepath and access it when the dialog ends instead of the display version (with added zero-width spaces).

Using an Item delegate is definitely overkill just to get wrap mode set to "word boundary and then any" when you can trick normal word wrap into that exact same behaviour.

Very nice!
KevinH is online now   Reply With Quote