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. Problem: font size changed with html font tag

Problem: font size changed with html font tag

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.5k 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
    shalongbasi
    wrote on last edited by
    #1

    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
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      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