PDA

View Full Version : formatting a tool tip without using a styleSheet



dennisvz
17th March 2018, 11:18
I am trying to format the appearance of a tool tip tool tip without using a style sheet (I have already set a style sheet for this button and a new style sheet will over rite the old one). so far, I have this:



self.ui.taxTables.setToolTip('<b><font color=red><font-size: 24px><background-color: #00ffff>My tool tip message is here')


The bold and the font color work, but the font-size and background color do not. Is it possible to format a tool tip this way? Is the syntax not correct?

thanks
Newbie

d_stranz
17th March 2018, 15:34
Refer to the Qt documentation on the subset of HTML support in the Rich Text Format (https://doc.qt.io/qt-5/richtext-html-subset.html), which is what you (maybe unknowingly) are using in your tooltip.

dennisvz
17th March 2018, 16:59
Thanks for responding

Well, I read the documentation. I do not know HTML, and the docs do not give me an example that I can follow. I do not know the syntax, like when and where to use <>, =, :, or "". One example of using all of my fonts, colors, background, and font size would help.