Skip to content

Tracking upstream issue QTBUG-85498 #815

@sssoleileraaa

Description

@sssoleileraaa

Description

This is an issue to track upstream issue: https://bugreports.qt.io/browse/QTBUG-85498

We use QLabels in various places, including our message and reply speech bubbles. QLabel provides a wrapping feature but does not automatically wrap strings that are longer than the width of the label and contains no spaces, dashes, and other unknown wrapping-point characters (wrapping points are not documented or specified in the Qt code so it's a bit of an unknown).

More info

QLabel knows to wrap based on the length of a line of text and where the nearest wrapping-point character is within the bounds of the width of the label. Unfortunately, there isn't Qt support to adjust the wrapping policy to say that we prefer wrapping over cutting off strings that don't contain wrapping points.

We've learned that QTextEdit and QPlainTextEdit support the kind of wrapping we are interested in by default, however as you can see in #1050 there is the problem with recalculating and setting the height of a QTextEdit to fit the contents of its internal document.

Test data can be found here: https://github.com/freedomofpress/securedrop-client/wiki/Test-plan#input-testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions