October 5, 2010

Sorin Sorin
Lab Rat
66 posts

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:

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

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

 Signature 

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

2 replies

October 6, 2010

Sorin Sorin
Lab Rat
66 posts

I’m asking because I’m trying to do this control [img839.imageshack.us] , 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

 Signature 

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

October 6, 2010

VC15 VC15
Lab Rat
27 posts

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.

 
  ‹‹ [Solved]Problem compiling with Q_PROPERTY      Working with several QDockWidgets ››

You must log in to post a reply. Not a member yet? Register here!