<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Excellent, that works perfectly, thanks Maurizio 👍</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Best regards</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Matic<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Maurizio Berti <maurizio.berti@gmail.com><br>
<b>Sent:</b> Wednesday, August 23, 2023 11:47 PM<br>
<b>To:</b> Matic Kukovec <kukovecmatic@hotmail.com><br>
<b>Cc:</b> PyQt@riverbankcomputing.com <pyqt@riverbankcomputing.com><br>
<b>Subject:</b> Re: Linux Mint Cinnamon - tooltip font color bug</font>
<div> </div>
</div>
<div>
<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="x_gmail_quote">
<div dir="ltr" class="x_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="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_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 size="71154" style="max-width:100%" data-outlook-trace="F:1|T:1" 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="x_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="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_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>
</div>
</body>
</html>