Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Beginners: draw text and color segments

Beginners: draw text and color segments

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

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

      http://anavi.org/

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SherifOmran
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved