Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Problem: font size changed with html font tag

    General and Desktop
    2
    2
    1350
    Loading More Posts
    • 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
      shalongbasi last edited by

      in the Qtdesigner, I have a text label with font defined as "Ubuntu 12". in the code, if I just change the text of the lable, it is ok to display, such as "1234", no problem. but when I try to change the color of text with the html font tag, such "<font color="red">1234", the size of "1234" displayed on the screen became a little bigger because of bottom part of "1234" is wiped off. if I add size control in font tag, <font color="red" size=12">, the "1234" totally disappeard. how can I just changed the color with affect the size of label text? thanks

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        Try this:
        @
        <span style="color: red">1234</span>
        @

        1 Reply Last reply Reply Quote 0
        • First post
          Last post