Color Underline ( stylesheet )

  • 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?

  • I'm asking because I'm trying to do this "control": , 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

  • 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.

Log in to reply