QML Text/Label horizontal alignment bug

asked 2014-03-26 20:44:04 +0300

coderus gravatar image

updated 2014-03-26 21:27:47 +0300

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
}

bug

edit retag flag offensive close delete

Comments

1

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 +0300 )edit

i 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 +0300 )edit
2

@coderus: Here you can fill Qt bugs: https://bugreports.qt-project.org

ejjoman ( 2014-03-28 13:56:41 +0300 )edit

Not 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 +0300 )edit