[Interest] Regression? Change of html copied to clipboard from QTextEdit

Olivier B. perso.olivier.barthelemy at gmail.com
Fri Jun 25 16:26:03 CEST 2021


Some text in QTextEdit now seem to lose style when copypasted in an app
built with Qt-5.15.2
In the appli built with 5.11.1, there is not the issue.
I am copying from one read only QTextEdit to an other writable one.

When overloading QTextEdit to debug clipboard data
in createMimeDataFromSelection(), the resulting html has some differences.
Some <p> markups became <pre>, resulting in text in fixed width style
instead of the original text style.
Those changes are not from the original html printed in the QTextEdit

Original printed text contains <td>mycontent</td>
In createMimeDataFromSelection() with 5.11.1, text contains <td><p
some-qt-attributs=xxx>mycontent</p></td>
In createMimeDataFromSelection() with 5.15.2, text contains <td><pre
some-qt-attributs=xxx>mycontent</pre></td>

The strange thing is that in the second writable QTextEdit, if i copy some
text to clipboard, <p> are added, not <pre>

Should i create a bug? Or any idea if an option of QTextEdit influences
this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210625/25ad888a/attachment.html>


More information about the Interest mailing list