Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135427

Add a readonly elided property to QML Text item

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • Not Evaluated
    • None
    • None
    • None

    Description

      I would like to create a control where the text is elided by default, but if the text was shortened it shows an "expand" control that shows the full text.

      There seems to be no way to tell if the display text in a Text item was shortened, either by the `elide` property or the `maximumLineCount`.

      I thought maybe I could hack it using the `line.isLast` property in the `lineLaidOut` callback, but that seems to be set on the final visual line, not when the line is the actual last line in the text, so it doesn't work.

      It would be very useful to have an `elided` property that would be `true` when the visible text was shortened by `elide` and/or `maximumLineCount`.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mattsidefx Matt Chaput
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes