TextArea rich text css margin and padding not working.
-
wrote on 21 Apr 2020, 13:41 last edited by
import QtQuick 2.0 import QtQuick.Controls 2.12 Rectangle { width: 500 height: 500 TextArea { anchors.fill:parent color:"#FFFFFF" readOnly: true textFormat: Text.RichText wrapMode: Text.Wrap text:"<p style='background:#181818;color:white;padding:20px;margin:10px;'>HELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLDHELLO WORLD</p>" } }
-
wrote on 21 Apr 2020, 14:39 last edited by
Only a subset is supported:
https://doc.qt.io/qt-5/richtext-html-subset.html
It can be frustrating and the subset is quite limiting. If you need something like a browser using WebEngine might be better. -
Only a subset is supported:
https://doc.qt.io/qt-5/richtext-html-subset.html
It can be frustrating and the subset is quite limiting. If you need something like a browser using WebEngine might be better. -
@fcarney Thanks. But webegine is too big, if I modify the rich text css rendering of TextArea of qt, is it troublesome?
wrote on 2 May 2020, 19:56 last edited by@senmx said in TextArea rich text css margin and padding not working.:
if I modify the rich text css rendering of TextArea of qt, is it troublesome?
How do you propose to do that?