Details
-
Suggestion
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
None
-
None
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
- is replaced by
-
QTBUG-707 Suggestion for a QTextCursor on a QLabel
-
- Open
-