Fix elide mode behaviour#4106
Conversation
By default word wrap for QTableView is enabled. If cell's text include quated string or colon or dash (like date: 2025-09-01 00:00:01) then text truncated too much. For example instead of "2005-09-01 00:00:..." truncate to "2005-09-01..."
|
Already done here conditionally: Should that version range changed? Is this a regression in Qt? If you tell us your Qt version, maybe it's better to adjust the check. |
|
My QT version is 5.9.3. Official version uses QT 5.15.2 and has the same issue. |
|
OK, it's probably not related to the bug for which we inserted that check. It seems that you'd simply prefer the truncation behaviour. Ideally, when there are more than one line visible, the last line should be truncated, but the rest wrapped to the next line. But that should be done at the Qt level. Maybe you could implement a new setting to make that user-configurable in Preferences, or implement a logic in which when only one line is visible, word wrapping is disabled, but if the user modified the height, word wrapping is applied. |
|
Thanks, @kor44. I'd do it simpler, using positive logic and call it unconditionally, that is: setWordWrap (Settings::getValue("databrowser", "cell_word_wrap").toBool());In that case, the text has to say "Enable word wrap in cells" with default being |
- switch option to positive logic - invoke unconditional setWordWrap()
|
@mgrojo, you were right. Positive logic is better. |
|
Thanks, @kor44 |


By default word wrap for QTableView is enabled. If cell's text include quated string or colon or dash (like date: 2025-09-01 00:00:01) then text truncated too much.
For example instead of "2005-09-01 00:00:..." truncate to "2005-09-01..."
This is SQL command to create test data