<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Il giorno sab 5 giu 2021 alle ore 19:59 Matic Kukovec <<a href="mailto:kukovecmatic@hotmail.com">kukovecmatic@hotmail.com</a>> ha scritto:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><span style="font-size:12pt">But there is a workaround: do NOT set any color settings in the stylesheet concerning the text color (the
</span><i style="font-size:12pt"><b>color</b></i><span style="font-size:12pt"> attribute) and</span><br></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
then use <i><b>QTabBar.setItemTextColor </b></i>on each tab and painting the current tab's background manually, every time something changes in the tab bar layout (tabInserted, tabRemoved, ...).</div></div></blockquote><div><br></div><div>Ooops, I completely forgot about that. (I believe you meant setTabTextColor, by the way).</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Now another issue has come up. When click&dragging an active tab, the drag image is that of the stylesheet painted tab,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
not the image of the "blue" one that is actually painted in the tab bar:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<img size="35855" style="max-width: 100%;" src="cid:179dd7237d8e53d1aa24"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The image is a white background and white text, that's why it looks like the text disappears.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have no idea where this image is set. Is there a way to fix this?</div></div></blockquote><div><br></div><div>The dragged tab is actually a "fake" tab, it's a QWidget that shows a pixmap drawn internally using drawControl (and this is a good reason for which using a proxy style might solve many problems).</div><div>I answered a related question on StackOverflow some time ago, you might have a look at it, at least to understand how it works: <a href="https://stackoverflow.com/a/64346097">https://stackoverflow.com/a/64346097</a></div><div><br></div><div>Maurizio</div></div>-- <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></div></div></div>