QML Text/Label horizontal alignment bug
QMl Rich Text/Label element have incorrect horizontal alignment if line starts with html image inside
Label {
width: parent.width
horizontalAlignment: Text.AlignRight
text: '<img src="image://theme/graphic-busyindicator-small">text'
textFormat: Text.RichText
wrapMode: Text.Wrap
}
Couldn't you use an image component and a text component ? Moreover, I think this is related to Qt, and should be posted upstream as a bug.
Sfiet_Konstantin ( 2014-03-28 13:20:58 +0200 )editi thought someone will ask it, because too generic image choosen. i'm using it for inline emoticons. and can you point me where to fill Qt bug?
coderus ( 2014-03-28 13:23:42 +0200 )edit@coderus: Here you can fill Qt bugs: https://bugreports.qt-project.org
ejjoman ( 2014-03-28 13:56:41 +0200 )edithttps://bugreports.qt-project.org/browse/QTBUG-38003
coderus ( 2014-04-01 10:35:27 +0200 )editNot tested, but as a crude workaround you can add css:
<style>img { vertical-align: middle; }</style><img src="image://theme/graphic-busyindicator-small">text
http://www.w3schools.com/cssref/pr_pos_vertical-align.asp
Tanghus ( 2015-08-02 15:28:58 +0200 )edit