Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator - How can I set the background color of a tooltip to be different than the widget?

I am working on a GUI and I've run into a problem. If I set a button, label, or other widget to have a background color, the tooltip for that widget also takes the same background color. I tried editing the style sheet for the tooltip specifically and setting a different background color but it doesn't work. I also tried editing the palette for the widget but changing the color scheme for the tooltip background or text doesn't work either. Is there another way I can do this? I'd like to have consistency between all my tooltips.

Thanks!

like image 437
lomokat Avatar asked Dec 04 '12 00:12

lomokat


People also ask

Can we change the background color of tooltip in tableau?

The ability to change the background color of the tooltip is currently not built into Tableau Desktop.

How can I change Bootstrap tooltip background color?

By aiming . tooltip-inner and . tooltip-arrow::before , you can change the color.

How do you change the background color on tooltip in flutter?

You can change the background color of the tooltip in the slider using the tooltipBackgroundColor property. You must import the theme.


1 Answers

You can do something like this to style a QToolTip in general.

QToolTip { color: #fff; background-color: #000; border: none; }

When you need to style QToolTips specifically, based on their parent widget you can use following syntax:

ParentWidgetName QToolTip { color: #333; background-color: #1c1c1c; border: none; }

Reading this will help you further.

like image 184
warunanc Avatar answered Sep 22 '22 02:09

warunanc