[BUG] Some styles does not work (background-color, background-image)
-
Works:
@
Label {
text: "<span style="color: red">Del</span>"
textFormat: Text.RichText
}
@Does not work:
@
Label {
text: "<span style="background-color: red">Del</span>"
textFormat: Text.RichText
}
@
@
Label {
text: "<span style="background-image: some_url">Del</span>"
textFormat: Text.RichText
}
@ -
Hi,
This is a bug. See "QTBUG-34219":https://bugreports.qt-project.org/browse/QTBUG-34219
-
Thanks, p3c0! Are there any workarounds?
-
You could use a Rectangle and Image elements and place it behind the Text and setting width and height of those to that of Text element.
-
border-color and border-style don't work too
@
Label {
text: "<span style="border-color:red; border-style:solid">Del</span>"
textFormat: Text.RichText
}
@ -
Yes I think "many of these":https://qt-project.org/doc/qt-5/richtext-html-subset.html#css-properties may not be working.
-
Please vote for bug "QTBUG-34219":https://bugreports.qt-project.org/browse/QTBUG-34219. Thanks!