<div dir="ltr">Try to see if it works if you set a custom palette for QToolTip with the ToolTipText role set (and maybe other text roles) <b>without</b> setting the color property in the stylesheet. If it does work, then add some sort of checking for OS, style (I assume that cinnamon uses a custom style, possibly with a valid object name) and OS version so that you could eventually fix that specific target, if you want.<div><br></div><div><font face="monospace">tipPalette = app.palette()<br>tipPalette.setColor(QPalette.ColorRole.ToolTipText, QColor('red'))</font></div><div><font face="monospace">QToolTip.setPalette(tipPalette)</font></div><div><br></div><div>Ensure that you're not setting the color property for generic selectors (like <font face="monospace">'QWidget { ... }'</font>)</div><div><div><br></div><div>Maurizio</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 21 ago 2023 alle ore 09:29 Matic Kukovec <<a href="mailto:kukovecmatic@hotmail.com">kukovecmatic@hotmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg6159829305205760992">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Specs:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li style="list-style-type:disc">Linux Mint 21.2 - Cinnamon desktop</li><li style="list-style-type:disc">Python 3.10</li><li style="list-style-type:disc">PyQt 6.5.1</li></ul>
<div>Note: this is an issue exclusive to Linux Mint Cinnamon.<br>
</div>
<div>When setting a custom stylesheet for QTooltip, the application does not respect the font. Example:</div>
<blockquote style="margin-top:0px;margin-bottom:0px">
<div>The global stylesheet is:</div>
<div>"""</div>
<div>...</div>
<div><br>
</div>
<div>QTooltip {</div>
<div><span>      </span>background: red;</div>
<div><span>      </span>color: white;</div>
<div><span>      </span>border: white;<br>
</div>
<div>}</div>
<div><br>
</div>
<div>...<br>
</div>
<div>"""</div>
<div>and the tooltips look like this:</div>
<div><img style="max-width: 100%;" size="71154" src="cid:18a245577b4cb971f161"></div>
<div>The font is black, but it should be white!<br>
</div>
</blockquote>
<div><br>
</div>
<div>This is probably a Qt issue, because if the QTooltip style is removed from the stylesheet and default<br>
</div>
<div>OS stylesheets are used, they have the same problem as reported by this user:<br>
</div>
<div><a href="https://github.com/linuxmint/cinnamon/issues/11820" id="m_6159829305205760992LPNoLPOWALinkPreview" target="_blank">https://github.com/linuxmint/cinnamon/issues/11820</a> (the first post)<br>
</div>
<div><br>
</div>
<div>Is there a way to circumvent this in PyQt6 until this is fixed?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Matic<br>
</div>
<div>
<div></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
</div>

</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>