maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [SFOS] need help for support of html tags in text in qml (https://talk.maemo.org/showthread.php?t=100364)

smatkovi 2018-06-19 16:29

need help for support of html tags in text in qml
 
i wanted to add htmltagfunctionality to harbour nemosyne, therefor i wanted to add after line 73 here https://github.com/prplmnky/harbour-...ges/Answer.qml
a textFormat: Text.StyledText statement and hoped it could support htmltags then, but unfortunately, when i run harbour-nemosyne in terminal, after compilation with the sdk it tells me that it cannot asssign to non-existent property "textFormat"

harbour-vocabulary supports htmltags, but has a weaker algorithm i think, but i couldn't find out why it supports them and nemosyne not. thanks in advance for any help on this topic

Halftux 2018-06-19 17:39

Re: need help for support of html tags in text in qml
 
Maybe change "paragraph" to "text" or "label". They should have a textFormat property.
Keep in mind that I have no clue about qml, but it is worth a try.:D

smatkovi 2018-06-19 20:00

Re: need help for support of html tags in text in qml
 
Quote:

Originally Posted by Halftux (Post 1545646)
Maybe change "paragraph" to "text" or "label". They should have a textFormat property.
Keep in mind that I have no clue about qml, but it is worth a try.:D

so it matters how this is called? i thought like Text {} could be anything {} and i can use textFormat: anything.StyledText

smatkovi 2018-06-19 20:39

Re: need help for support of html tags in text in qml
 
how awesome, replacing paragraph with text just works :) although it displayed the whole text in one line and it disappeared on the edge, so adding the line wrapMode: Text.WordWrap fixed this


All times are GMT. The time now is 00:49.

vBulletin® Version 3.8.8