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. Color Underline ( stylesheet )
QtWS25 Last Chance

Color Underline ( stylesheet )

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

    Can I choose a color for the line under the text?( just for that line, I don't want to color the text of the widget ). Something like:

    @widget->setStyleSheet( " QToolButton {text-decoration: underline color blue} ")@

    If not any idea about how should I do it?
    Thanks!

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sorin
      wrote on last edited by
      #2

      I'm asking because I'm trying to do this "control":http://img839.imageshack.us/img839/3062/colorcontrol.png , when I press the combo arrow I want to call QColorDialog, this is easy , the hard part is to create that combo and update its color with the one that I choose from QColorDialog

      There are only 10 types of people in the world: Those who understand binary, and those who don't

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VC15
        wrote on last edited by
        #3

        You could create a pixmap in runtime with letter A underlined with appropriate color and display this pixmap. This solution is likely to be not very fast but maybe it will work.

        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