Beginners: draw text and color segments



  • Hello guys,

    I want to draw a text and color characters of this on the fly

    ex: Hello World

    I think i should use QTextDocument. But Is there an easier way rather than repacking html syntax for each new colored character?



  • You can also use style sheets. Btw QLabel is also appropriate to insert text if the text is not editable.



  • I want to show a text in Black say
    Hello

    and loop each letter to change the color from black to red and wait 1 sec then back to balck.

    Is it possible with stylesheets? Can a lable carry multiline?

    highlighting ... similar to QSyntaxHighlighter


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.