Quote:
Originally Posted by wrCisco
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!