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

Expose QLabel's QTextCursor to the public API

    XMLWordPrintable

Details

    Description

      QLabel allows to set rich text on it, but there is no way to get selected rich text out of it.

      QString richText = label.textCursor().selection().toHtml();

      would be pretty convenient.

      I have noticed that if one selects some text with html-inserted images in a QLabel and drag'n'drops the selection into a QTextEdit, the whole selection, including the selected images, gets copied in the QTextEdit, meaning that the QTextEdit has some way of getting the selected rich text out of the QLabel.
      Would be nice if something like that, something that allows to get selected rich text in a QLabel, was in the public API.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              nurupo nurupo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes