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

QStaticText and QTextDocument need a way to limit number of lines and elide

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • GUI: Font handling

    Description

      https://projects.maemo.org/bugzilla/show_bug.cgi?id=260814

      We need a way to display only, say, 3 lines of text, eliding at the end.

      For example:

      QTextOption option = m_staticText.textOption();
      option.setWrapMode(QTextOption::WordWrap);
      /* Proposed API */
      option.setMaximumNumberOfLines(maxLines);
      option.setElide(true);
      option.setElideText("...");
      m_staticText.setTextOption(option);

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            pironato Stefano Pironato
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes